diff options
| author | Rosen Penev <rosenp@gmail.com> | 2018-11-28 05:10:46 -0800 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2018-11-28 14:10:46 +0100 |
| commit | 7690716e4fa8ac3ae9b513f4adba685f9e2c0e1f (patch) | |
| tree | 6c01fae47d8e2af4660ae67c1fe52ca445a9aaa8 /src | |
| parent | c97fb2e93e9c7d66b1ce70fa681a762d1f430521 (diff) | |
| download | ngircd-7690716e4fa8ac3ae9b513f4adba685f9e2c0e1f.tar.gz ngircd-7690716e4fa8ac3ae9b513f4adba685f9e2c0e1f.zip | |
Fix compilation without deprecated OpenSSL APIs (#252)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/conf-ssl.h | 4 | ||||
| -rw-r--r-- | src/ngircd/conn-ssl.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ngircd/conf-ssl.h b/src/ngircd/conf-ssl.h index c2373797..af715af8 100644 --- a/src/ngircd/conf-ssl.h +++ b/src/ngircd/conf-ssl.h @@ -13,6 +13,10 @@ #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 diff --git a/src/ngircd/conn-ssl.c b/src/ngircd/conn-ssl.c index 705c29d5..ba47e513 100644 --- a/src/ngircd/conn-ssl.c +++ b/src/ngircd/conn-ssl.c @@ -42,6 +42,7 @@ extern struct SSLOptions Conf_SSLOptions; #ifdef HAVE_LIBSSL #include <openssl/err.h> #include <openssl/rand.h> +#include <openssl/dh.h> 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; - 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); |