[asterisk-commits] BuildSystem: Add patches to allow building with recent LibreSSL (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 13 05:47:12 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5790 )

Change subject: BuildSystem: Add patches to allow building with recent LibreSSL
......................................................................

BuildSystem: Add patches to allow building with recent LibreSSL

Add some #if defined checks which allow building against LibreSSL.
These patchess come from OpenBSD ports:
https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/telephony/asterisk/patches/

ASTERISK-27043 #close
Reported by: OpenBSD ports

Change-Id: I2f6c08a5840b85ad4d2b75370b947ddde7a9a572
---
M main/iostream.c
M main/libasteriskssl.c
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/iostream.c b/main/iostream.c
index 06414cf..2a2601d 100644
--- a/main/iostream.c
+++ b/main/iostream.c
@@ -508,13 +508,13 @@
 					ERR_error_string(sslerr, err), ssl_error_to_string(sslerr, res));
 			}
 
-#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
 			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_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
+#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
 				ERR_remove_thread_state(NULL);
 #else
diff --git a/main/libasteriskssl.c b/main/libasteriskssl.c
index 0ed05e3..9da63de 100644
--- a/main/libasteriskssl.c
+++ b/main/libasteriskssl.c
@@ -72,7 +72,7 @@
 	}
 }
 
-#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
+#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 int SSL_library_init(void)
 {
 #if defined(AST_DEVMODE)
@@ -127,7 +127,7 @@
 int ast_ssl_init(void)
 {
 #if defined(HAVE_OPENSSL) && defined(OPENSSL_VERSION_NUMBER) && \
-	OPENSSL_VERSION_NUMBER < 0x10100000L
+	(OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
 	unsigned int i;
 	int (*real_SSL_library_init)(void);
 	void (*real_CRYPTO_set_id_callback)(unsigned long (*)(void));

-- 
To view, visit https://gerrit.asterisk.org/5790
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2f6c08a5840b85ad4d2b75370b947ddde7a9a572
Gerrit-Change-Number: 5790
Gerrit-PatchSet: 2
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170613/9a5616bf/attachment-0001.html>


More information about the asterisk-commits mailing list