[sr-dev] git:master:1285d8a2: tls: fix wrong macro used to detect OpenSSL 1.1.0+

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 22 19:22:27 CET 2021


Module: kamailio
Branch: master
Commit: 1285d8a291a1b746a33d643004153203bc06b6cb
URL: https://github.com/kamailio/kamailio/commit/1285d8a291a1b746a33d643004153203bc06b6cb

Author: SPChan <shihping.chan at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-11-22T19:22:23+01:00

tls: fix wrong macro used to detect OpenSSL 1.1.0+

---

Modified: src/modules/tls/tls_domain.c

---

Diff:  https://github.com/kamailio/kamailio/commit/1285d8a291a1b746a33d643004153203bc06b6cb.diff
Patch: https://github.com/kamailio/kamailio/commit/1285d8a291a1b746a33d643004153203bc06b6cb.patch

---

diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c
index b5160ec833..5f939df1d4 100644
--- a/src/modules/tls/tls_domain.c
+++ b/src/modules/tls/tls_domain.c
@@ -62,7 +62,7 @@ extern EVP_PKEY * tls_engine_private_key(const char* key_id);
  * prime256v1 by default.  This is Apache mod_ssl's initialization
  * policy, so we should be safe. OpenSSL 1.1 has it enabled by default.
  */
-#if !defined(OPENSSL_NO_ECDH) && !defined(OPENSSL_VERSION_1_1)
+#if !defined(OPENSSL_NO_ECDH) && OPENSSL_VERSION_NUMBER < 0x10100000L
 static void setup_ecdh(SSL_CTX *ctx)
 {
 #if !defined(SSL_CTX_set_ecdh_auto)
@@ -701,7 +701,7 @@ static int set_cipher_list(tls_domain_t* d)
 					tls_domain_str(d), cipher_list);
 			return -1;
 		}
-#if !defined(OPENSSL_NO_ECDH) && !defined(OPENSSL_VERSION_1_1)
+#if !defined(OPENSSL_NO_ECDH) && OPENSSL_VERSION_NUMBER < 0x10100000L
                 setup_ecdh(d->ctx[i]);
 #endif
 #ifndef OPENSSL_NO_DH




More information about the sr-dev mailing list