From 2c8d0764de87037ce52656e13b36de5d9876aeaa Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sat, 21 Jan 2017 07:57:33 +0200 Subject: openssl 1.1 support: use OPENSSL_VERSION_NUMBER Use OPENSSL_VERSION_NUMBER instead of OPENSSL_API_COMPAT to detect the openssl 1.1 API. Change-Id: I4e448f55ef516aedf6ad154037c35577a421a458 --- main/iostream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main/iostream.c') diff --git a/main/iostream.c b/main/iostream.c index 22cd5985c..6187bc2fb 100644 --- a/main/iostream.c +++ b/main/iostream.c @@ -465,19 +465,19 @@ int ast_iostream_close(struct ast_iostream *stream) SSL_get_error(stream->ssl, res)); } -#if defined(OPENSSL_API_COMPAT) && OPENSSL_API_COMPAT >= 0x10100000L +#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L if (!SSL_is_server(stream->ssl)) { #else if (!stream->ssl->server) { #endif /* For client threads, ensure that the error stack is cleared */ -#if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < 0x10100000L +#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L #if OPENSSL_VERSION_NUMBER >= 0x10000000L ERR_remove_thread_state(NULL); #else ERR_remove_state(0); #endif /* OPENSSL_VERSION_NUMBER >= 0x10000000L */ -#endif /* !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < 0x10100000L */ +#endif /* !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L */ } SSL_free(stream->ssl); -- cgit v1.2.3