mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-19 12:02:52 +00:00
Fix compilation without deprecated OpenSSL APIs (#252)
This commit is contained in:
parent
c97fb2e93e
commit
7690716e4f
@ -13,6 +13,10 @@
|
|||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
#define SSL_SUPPORT
|
#define SSL_SUPPORT
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
|
#define OpenSSL_version SSLeay_version
|
||||||
|
#define OPENSSL_VERSION SSLEAY_VERSION
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBGNUTLS
|
#ifdef HAVE_LIBGNUTLS
|
||||||
#define SSL_SUPPORT
|
#define SSL_SUPPORT
|
||||||
|
@ -42,6 +42,7 @@ extern struct SSLOptions Conf_SSLOptions;
|
|||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
|
#include <openssl/dh.h>
|
||||||
|
|
||||||
static SSL_CTX * ssl_ctx;
|
static SSL_CTX * ssl_ctx;
|
||||||
static DH *dh_params;
|
static DH *dh_params;
|
||||||
@ -326,7 +327,7 @@ ConnSSL_InitLibrary( void )
|
|||||||
Verify_openssl);
|
Verify_openssl);
|
||||||
SSL_CTX_free(ssl_ctx);
|
SSL_CTX_free(ssl_ctx);
|
||||||
ssl_ctx = newctx;
|
ssl_ctx = newctx;
|
||||||
Log(LOG_INFO, "%s initialized.", SSLeay_version(SSLEAY_VERSION));
|
Log(LOG_INFO, "%s initialized.", OpenSSL_version(OPENSSL_VERSION));
|
||||||
return true;
|
return true;
|
||||||
out:
|
out:
|
||||||
SSL_CTX_free(newctx);
|
SSL_CTX_free(newctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user