瀏覽代碼

Merge pull request #61 from muzaffar1331/fix-major-bugs

Fix major bugs. Done during IETF 102 hackathon.
master
Adrian Chadd 6 年之前
committed by GitHub
父節點
當前提交
3209c7f9b1
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. +6
    -3
      src/httperf.c

+ 6
- 3
src/httperf.c 查看文件

@@ -668,6 +668,8 @@ main(int argc, char **argv)
param.ssl_ca_path = optarg;
else if (flag == &param.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);


Loading…
取消
儲存