<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/5786">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: Add patches to allow building with recent LibreSSL<br><br>Add some #if defined checks which allow building against LibreSSL.<br>These patchess come from OpenBSD ports:<br>https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/telephony/asterisk/patches/<br><br>ASTERISK-27043 #close<br>Reported by: OpenBSD ports<br><br>Change-Id: I2f6c08a5840b85ad4d2b75370b947ddde7a9a572<br>---<br>M main/libasteriskssl.c<br>M main/tcptls.c<br>2 files changed, 4 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/libasteriskssl.c b/main/libasteriskssl.c<br>index df45919..292c98e 100644<br>--- a/main/libasteriskssl.c<br>+++ b/main/libasteriskssl.c<br>@@ -74,7 +74,7 @@<br>       }<br> }<br> <br>-#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L<br>+#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)<br> int SSL_library_init(void)<br> {<br> #if defined(AST_DEVMODE)<br>@@ -129,7 +129,7 @@<br> int ast_ssl_init(void)<br> {<br> #if defined(HAVE_OPENSSL) && defined(OPENSSL_VERSION_NUMBER) && \<br>-   OPENSSL_VERSION_NUMBER < 0x10100000L<br>+      (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))<br>         unsigned int i;<br>       int (*real_SSL_library_init)(void);<br>   void (*real_CRYPTO_set_id_callback)(unsigned long (*)(void));<br>diff --git a/main/tcptls.c b/main/tcptls.c<br>index 1f99d7b..8e50a0c 100644<br>--- a/main/tcptls.c<br>+++ b/main/tcptls.c<br>@@ -446,13 +446,13 @@<br>                                     ERR_error_string(sslerr, err), ssl_error_to_string(sslerr, res));<br>                     }<br> <br>-#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L<br>+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)<br>                         if (!SSL_is_server(stream->ssl)) {<br> #else<br>                         if (!stream->ssl->server) {<br> #endif<br>                            /* For client threads, ensure that the error stack is cleared */<br>-#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L<br>+#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)<br> #if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER >= 0x10000000L<br>                           ERR_remove_thread_state(NULL);<br> #else<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/5786">change 5786</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/5786"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I2f6c08a5840b85ad4d2b75370b947ddde7a9a572 </div>
<div style="display:none"> Gerrit-Change-Number: 5786 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Guido Falsi <madpilot@freebsd.org> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>