inadyn: Fix compilation without deprecated OpenSSL APIs

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2019-01-06 21:15:55 -08:00
parent 483c9fceae
commit 99c54c97e4
2 changed files with 25 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -25,17 +25,21 @@
int ssl_init(void)
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
SSL_load_error_strings();
OpenSSL_add_all_algorithms();
+#endif
return 0;
}
void ssl_exit(void)
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
ERR_free_strings();
EVP_cleanup();
+#endif
}
static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)