INN commit: branches/2.6/nnrpd (tls.c)

INN Commit rra at isc.org
Thu May 30 13:58:41 UTC 2019


    Date: Thursday, May 30, 2019 @ 06:58:41
  Author: iulius
Revision: 10340

nnrpd:  fix build issue with LibreSSL

LibreSSL defines itself as version 2 of OpenSSL, though not
implementing the same API.

Modified:
  branches/2.6/nnrpd/tls.c

-------+
 tls.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Modified: tls.c
===================================================================
--- tls.c	2019-05-30 13:57:30 UTC (rev 10339)
+++ tls.c	2019-05-30 13:58:41 UTC (rev 10340)
@@ -652,8 +652,11 @@
         }
     }
 
-#if OPENSSL_VERSION_NUMBER >= 0x01010100fL
-    /* New API added in OpenSSL 1.1.1 for TLSv1.3 cipher suites. */
+#if OPENSSL_VERSION_NUMBER >= 0x01010100fL && defined(SSL_OP_NO_TLSv1_3)
+    /* New API added in OpenSSL 1.1.1 for TLSv1.3 cipher suites.
+     * Also check that SSL_OP_NO_TLSv1_3 is defined (to fix a build
+     * issue with LibreSSL considered as version 2, but without the
+     * same API as OpenSSL). */
     if (tls_ciphers13 != NULL) {
         if (SSL_CTX_set_ciphersuites(CTX, tls_ciphers13) == 0) {
             syslog(L_ERROR, "TLS engine: cannot set ciphersuites");



More information about the inn-committers mailing list