Commit 7afa812b authored by Eneas Queiroz's avatar Eneas Queiroz Committed by Philipp Schafft

Don't use deprecated API with openssl 1.1+

OpenSSL 1.1.0 has deprecated SSL_load_error_strings and
SSL_library_init.  Initialization is done automatically, so they're not
needed with icecast.  Fixes issue #2318Signed-off-by: Eneas Queiroz's avatarEneas U de Queiroz <cote2004-github@yahoo.com>
parent 526ecdaa
Pipeline #232 passed with stage
in 44 seconds
......@@ -56,8 +56,10 @@ struct tls_tag {
void tls_initialize(void)
{
#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_load_error_strings(); /* readable error messages */
SSL_library_init(); /* initialize library */
#endif
}
void tls_shutdown(void)
{
......@@ -80,7 +82,11 @@ tls_ctx_t *tls_ctx_new(const char *cert_file, const char *key_file, const char *
if (!ctx)
return NULL;
#if OPENSSL_VERSION_NUMBER < 0x10100000L
method = SSLv23_server_method();
#else
method = TLS_server_method();
#endif
ctx->refc = 1;
ctx->ctx = SSL_CTX_new(method);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment