Skip to content

Commit

Permalink
Fix compilation without deprecated OpenSSL APIs (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
neheb authored and alexbarton committed Nov 28, 2018
1 parent c97fb2e commit 7690716
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/ngircd/conf-ssl.h
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/ngircd/conn-ssl.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7690716

Please sign in to comment.