Browse code

tls: fix wrong macro used to detect OpenSSL 1.1.0+

SPChan authored on 22/11/2021 13:59:12 • Daniel-Constantin Mierla committed on 22/11/2021 18:22:23
Showing 1 changed files
... ...
@@ -62,7 +62,7 @@ extern EVP_PKEY * tls_engine_private_key(const char* key_id);
62 62
  * prime256v1 by default.  This is Apache mod_ssl's initialization
63 63
  * policy, so we should be safe. OpenSSL 1.1 has it enabled by default.
64 64
  */
65
-#if !defined(OPENSSL_NO_ECDH) && !defined(OPENSSL_VERSION_1_1)
65
+#if !defined(OPENSSL_NO_ECDH) && OPENSSL_VERSION_NUMBER < 0x10100000L
66 66
 static void setup_ecdh(SSL_CTX *ctx)
67 67
 {
68 68
 #if !defined(SSL_CTX_set_ecdh_auto)
... ...
@@ -701,7 +701,7 @@ static int set_cipher_list(tls_domain_t* d)
701 701
 					tls_domain_str(d), cipher_list);
702 702
 			return -1;
703 703
 		}
704
-#if !defined(OPENSSL_NO_ECDH) && !defined(OPENSSL_VERSION_1_1)
704
+#if !defined(OPENSSL_NO_ECDH) && OPENSSL_VERSION_NUMBER < 0x10100000L
705 705
                 setup_ecdh(d->ctx[i]);
706 706
 #endif
707 707
 #ifndef OPENSSL_NO_DH