INN commit: trunk/nnrpd (tls.c)

INN Commit rra at isc.org
Thu May 30 13:34:06 UTC 2019


    Date: Thursday, May 30, 2019 @ 06:34:05
  Author: iulius
Revision: 10338

nnrpd:  fix build issue with LibreSSL

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

Modified:
  trunk/nnrpd/tls.c

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

Modified: tls.c
===================================================================
--- tls.c	2019-04-27 09:45:36 UTC (rev 10337)
+++ tls.c	2019-05-30 13:34:05 UTC (rev 10338)
@@ -601,8 +601,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