]> arthur.barton.de Git - ngircd.git/commitdiff
Fix compilation without deprecated OpenSSL APIs (#252)
authorRosen Penev <rosenp@gmail.com>
Wed, 28 Nov 2018 13:10:46 +0000 (05:10 -0800)
committerAlexander Barton <alex@barton.de>
Wed, 28 Nov 2018 13:10:46 +0000 (14:10 +0100)
src/ngircd/conf-ssl.h
src/ngircd/conn-ssl.c

index c23737979a21e7043d1eed7ed488524b83742112..af715af8c7c1b773680b63f14890663962467623 100644 (file)
 #ifdef HAVE_LIBSSL
 #define SSL_SUPPORT
 #include <openssl/ssl.h>
 #ifdef HAVE_LIBSSL
 #define SSL_SUPPORT
 #include <openssl/ssl.h>
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#define OpenSSL_version SSLeay_version
+#define OPENSSL_VERSION SSLEAY_VERSION
+#endif
 #endif
 #ifdef HAVE_LIBGNUTLS
 #define SSL_SUPPORT
 #endif
 #ifdef HAVE_LIBGNUTLS
 #define SSL_SUPPORT
index 705c29d5baf855d2954b884a42feaf480b5cec1c..ba47e513603b69aba08f2b7cf25f6c20a1ad4555 100644 (file)
@@ -42,6 +42,7 @@ extern struct SSLOptions Conf_SSLOptions;
 #ifdef HAVE_LIBSSL
 #include <openssl/err.h>
 #include <openssl/rand.h>
 #ifdef HAVE_LIBSSL
 #include <openssl/err.h>
 #include <openssl/rand.h>
+#include <openssl/dh.h>
 
 static SSL_CTX * ssl_ctx;
 static DH *dh_params;
 
 static SSL_CTX * ssl_ctx;
 static DH *dh_params;
@@ -326,7 +327,7 @@ ConnSSL_InitLibrary( void )
                           Verify_openssl);
        SSL_CTX_free(ssl_ctx);
        ssl_ctx = newctx;
                           Verify_openssl);
        SSL_CTX_free(ssl_ctx);
        ssl_ctx = newctx;
-       Log(LOG_INFO, "%s initialized.", SSLeay_version(SSLEAY_VERSION));
+       Log(LOG_INFO, "%s initialized.", OpenSSL_version(OPENSSL_VERSION));
        return true;
 out:
        SSL_CTX_free(newctx);
        return true;
 out:
        SSL_CTX_free(newctx);