Eneas U de Queiroz
2018-May-29 12:34 UTC
[Icecast] [PATCH] 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 #2318
Signed-off-by: Eneas U de Queiroz <cote2004-github at yahoo.com>
---
src/tls.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/tls.c b/src/tls.c
index 36edd86..6bd1aee 100644
--- a/src/tls.c
+++ b/src/tls.c
@@ -51,8 +51,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)
{
--
2.16.1
Eneas U de Queiroz
2018-May-29 20:45 UTC
[Icecast] [PATCH v2 0/1] Don't use deprecated API with openssl 1.1+
I had to resend the patches, because I missed another deprecated call. Eneas U de Queiroz (1): Don't use deprecated API with openssl 1.1+ src/tls.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.16.1
Eneas U de Queiroz
2018-May-29 20:45 UTC
[Icecast] [PATCH v2 1/1] 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 #2318
Signed-off-by: Eneas U de Queiroz <cote2004-github at yahoo.com>
---
src/tls.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/tls.c b/src/tls.c
index 36edd86..e4688c5 100644
--- a/src/tls.c
+++ b/src/tls.c
@@ -51,8 +51,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)
{
@@ -71,7 +73,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);
--
2.16.1
Maybe Matching Threads
- [PATCH v2 1/1] Don't use deprecated API with openssl 1.1+
- trouble compiling Dovecot 2.2.31 on Solaris 10 SPARC - libssl_iostream_openssl.so is not portable!
- [PATCH] [libshout] tls: compile with OpenSSL 1.1.0
- [PATCH] Early request for comments: U2F authentication
- [PATCH 0/5] fix gcc warnings in CVS HEAD