提交 47c1a0e0 编写于 作者: R Richard Levitte

Only use TLS1.2 when it's available

Reviewed-by: NBen Laurie <ben@openssl.org>
上级 c02bcb66
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include <string.h> #include <string.h>
#include <openssl/opensslconf.h>
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/evp.h> #include <openssl/evp.h>
...@@ -117,7 +118,11 @@ int main(int argc, char *argv[]) ...@@ -117,7 +118,11 @@ int main(int argc, char *argv[])
for (; currtest < TOTAL_NUM_TESTS; currtest++) { for (; currtest < TOTAL_NUM_TESTS; currtest++) {
testresult = 0; testresult = 0;
if (currtest == TEST_SET_SESSION_TICK_DATA_TLS_1_2) { if (currtest == TEST_SET_SESSION_TICK_DATA_TLS_1_2) {
#ifndef OPENSSL_NO_TLS1_2
ctx = SSL_CTX_new(TLSv1_2_method()); ctx = SSL_CTX_new(TLSv1_2_method());
#else
continue;
#endif
} else { } else {
ctx = SSL_CTX_new(TLS_method()); ctx = SSL_CTX_new(TLS_method());
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册