]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: remove an unecessary SSL_OP_NO_* dependancy
authorEmmanuel Hocdet <manu@gandi.net>
Wed, 12 Jul 2017 12:25:38 +0000 (14:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Jul 2017 12:38:14 +0000 (14:38 +0200)
Use methodVersions table to display "OpenSSL library supports".

src/ssl_sock.c

index 7fa6420a376f92c6a171bae263bc3ac1977e7c12..fa815715541783348d8bccf0afc41e62ffa8414d 100644 (file)
@@ -8104,6 +8104,7 @@ __attribute__((constructor))
 static void __ssl_sock_init(void)
 {
        char *ptr;
+       int i;
 
        STACK_OF(SSL_COMP)* cm;
 
@@ -8166,23 +8167,10 @@ static void __ssl_sock_init(void)
 #endif
               "", ptr);
 
-       memprintf(&ptr, "%s\nOpenSSL library supports : "
-#if SSL_OP_NO_SSLv3
-                 "SSLv3 "
-#endif
-#if SSL_OP_NO_TLSv1
-                 "TLSv1.0 "
-#endif
-#if SSL_OP_NO_TLSv1_1
-                 "TLSv1.1 "
-#endif
-#if SSL_OP_NO_TLSv1_2
-                 "TLSv1.2 "
-#endif
-#if SSL_OP_NO_TLSv1_3
-                 "TLSv1.3"
-#endif
-              "", ptr);
+       memprintf(&ptr, "%s\nOpenSSL library supports :", ptr);
+       for (i = CONF_TLSV_MIN; i <= CONF_TLSV_MAX; i++)
+               if (methodVersions[i].option)
+                       memprintf(&ptr, "%s %s", ptr, methodVersions[i].name);
 
        hap_register_build_opts(ptr, 1);