]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: Fix compilation with OpenSSL 1.0.2
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 20 Apr 2022 16:30:17 +0000 (18:30 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 20 Apr 2022 20:34:44 +0000 (22:34 +0200)
The DH parameters used for OpenSSL versions 1.1.1 and earlier where
changed. For OpenSSL 1.0.2 and LibreSSL the newly introduced
ssl_get_dh_by_nid function is not used since we keep the original
parameters.

src/ssl_sock.c

index 145ccb3fbde41ee45c9049ac5076bd99ec37fa23..a7f232e4ffda93631a5419973d7ed4cbda3a3e2e 100644 (file)
@@ -2954,6 +2954,7 @@ end:
 #endif
 }
 
+#if (HA_OPENSSL_VERSION_NUMBER >= 0x10101000L)
 static inline HASSL_DH *ssl_get_dh_by_nid(int nid)
 {
 #if (HA_OPENSSL_VERSION_NUMBER >= 0x3000000fL)
@@ -2982,12 +2983,11 @@ end:
 #else
 
        HASSL_DH *dh = NULL;
-#if (HA_OPENSSL_VERSION_NUMBER >= 0x10101000L)
        dh = DH_new_by_nid(nid);
-#endif
        return dh;
 #endif
 }
+#endif
 
 
 static HASSL_DH * ssl_get_dh_1024(void)