summaryrefslogtreecommitdiff
path: root/main/tcptls.c
diff options
context:
space:
mode:
authorAlexander Traud <pabstraud@compuserve.com>2015-05-05 18:35:16 +0200
committerAlexander Traud <pabstraud@compuserve.com>2015-05-05 11:38:54 -0500
commit247fef66537b59649e7571d64e2c574a106dbd65 (patch)
tree256171a5ffb8842dde44b62a54d3bdce75d70604 /main/tcptls.c
parentf45833c9ade260f8cf866e65cd29eb146bdd559e (diff)
tcptls: Avoiding ERR_remove_state in OpenSSL.
ERR_remove_state was deprecated with OpenSSL 1.0.0 and was replaced by ERR_remove_thread_state. ERR_load_SSL_strings and ERR_load_BIO_strings were called by SSL_load_error_strings already and got removed. These changes allow OpenSSL forks like BoringSSL to be used with Asterisk. ASTERISK-25043 #close Reported by: Alexander Traud patches: asterisk_with_BoringSSL.patch uploaded by Alexander Traud (License 6520) Change-Id: If1c0871ece21a7e0763fafbd2fa023ae49d4d629
Diffstat (limited to 'main/tcptls.c')
-rw-r--r--main/tcptls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/tcptls.c b/main/tcptls.c
index ddeeeeaba..0b06d22ac 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -400,7 +400,11 @@ static int tcptls_stream_close(void *cookie)
if (!stream->ssl->server) {
/* For client threads, ensure that the error stack is cleared */
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ ERR_remove_thread_state(NULL);
+#else
ERR_remove_state(0);
+#endif /* OPENSSL_VERSION_NUMBER >= 0x10000000L */
}
SSL_free(stream->ssl);