Merge pull request #61 from muzaffar1331/fix-major-bugs
Fix major bugs. Done during IETF 102 hackathon.
Šī revīzija ir iekļauta:
revīzija
3209c7f9b1
@ -668,6 +668,8 @@ main(int argc, char **argv)
|
||||
param.ssl_ca_path = optarg;
|
||||
else if (flag == ¶m.ssl_protocol)
|
||||
{
|
||||
param.use_ssl = 1;
|
||||
|
||||
if (strcasecmp (optarg, "auto") == 0)
|
||||
param.ssl_protocol = 0;
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
@ -1060,7 +1062,7 @@ main(int argc, char **argv)
|
||||
SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_VERSION);
|
||||
break;
|
||||
#else
|
||||
ssl_ctx = SSL_CTX_new (TLSv1_client_method ()); break;
|
||||
ssl_ctx = SSL_CTX_new (TLSv1_client_method ());
|
||||
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2); break;
|
||||
#endif
|
||||
|
||||
@ -1072,7 +1074,7 @@ main(int argc, char **argv)
|
||||
SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_1_VERSION);
|
||||
break;
|
||||
#else
|
||||
ssl_ctx = SSL_CTX_new (TLSv1_client_method ()); break;
|
||||
ssl_ctx = SSL_CTX_new (TLSv1_client_method ());
|
||||
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_2); break;
|
||||
#endif
|
||||
|
||||
@ -1084,12 +1086,13 @@ main(int argc, char **argv)
|
||||
SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_2_VERSION);
|
||||
break;
|
||||
#else
|
||||
ssl_ctx = SSL_CTX_new (TLSv1_client_method ()); break;
|
||||
ssl_ctx = SSL_CTX_new (TLSv1_client_method ());
|
||||
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1); break;
|
||||
#endif
|
||||
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10101000L)
|
||||
/* 7/TLSv1.3 */
|
||||
case 7:
|
||||
ssl_ctx = SSL_CTX_new (TLS_client_method ());
|
||||
SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_3_VERSION);
|
||||
SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_3_VERSION);
|
||||
|
Notiek ielāde…
Atsaukties uz šo jaunā problēmā
Block a user