Only use TLS1.2 when it's available
authorRichard Levitte <levitte@openssl.org>
Wed, 3 Feb 2016 23:25:49 +0000 (00:25 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 4 Feb 2016 09:55:38 +0000 (10:55 +0100)
Reviewed-by: Ben Laurie <ben@openssl.org>
test/clienthellotest.c

index 9cb563c548541a94e5637d3a8b71491335ce0ec9..66fc27f48b144bfb81425b537a6f41c652cd12b8 100644 (file)
@@ -55,6 +55,7 @@
 
 #include <string.h>
 
+#include <openssl/opensslconf.h>
 #include <openssl/bio.h>
 #include <openssl/crypto.h>
 #include <openssl/evp.h>
@@ -117,7 +118,11 @@ int main(int argc, char *argv[])
     for (; currtest < TOTAL_NUM_TESTS; currtest++) {
         testresult = 0;
         if (currtest == TEST_SET_SESSION_TICK_DATA_TLS_1_2) {
+#ifndef OPENSSL_NO_TLS1_2
             ctx = SSL_CTX_new(TLSv1_2_method());
+#else
+            continue;
+#endif
         } else {
             ctx = SSL_CTX_new(TLS_method());
         }