mirror of https://github.com/aria2/aria2
GNUTLS: Remove ifdef for GNUTLS_TLS* since they are not macros
Since they are not macros, we get always TLS_PROTO_NONE (otherwise you are using SSLv3 and you will get warning nonetheless) and get warning.pull/319/head
parent
d755df2505
commit
ff2a630efe
|
@ -48,27 +48,14 @@ TLSVersion getProtocolFromSession(gnutls_session_t& session) {
|
|||
switch(proto) {
|
||||
case GNUTLS_SSL3:
|
||||
return TLS_PROTO_SSL3;
|
||||
|
||||
#ifdef GNUTLS_TLS1_0
|
||||
case GNUTLS_TLS1_0:
|
||||
return TLS_PROTO_TLS10;
|
||||
#endif // GNUTLS_TLS1_0
|
||||
|
||||
#ifdef GNUTLS_TLS1_1
|
||||
case GNUTLS_TLS1_1:
|
||||
return TLS_PROTO_TLS11;
|
||||
break;
|
||||
#endif // GNUTLS_TLS1_1
|
||||
|
||||
#ifdef GNUTLS_TLS1_2
|
||||
case GNUTLS_TLS1_2:
|
||||
return TLS_PROTO_TLS12;
|
||||
break;
|
||||
#endif // GNUTLS_TLS1_2
|
||||
|
||||
default:
|
||||
return TLS_PROTO_NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
|
Loading…
Reference in New Issue