[Home]

Summary:ASTERISK-27867: [patch] libasteriskssl: Allow OpenSSL 1.0.2 configured with no-deprecated.
Reporter:Alexander Traud (traud)Labels:patch
Date Opened:2018-05-20 06:32:55Date Closed:2018-05-29 12:08:42
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/General
Versions:13.21.0 15.4.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) libasteriskssl_13.patch
( 1) libasteriskssl_15.patch
Description:When OpenSSL is built from source, options can be configured. One option is to build without anything deprecated. This is the best option to test forward compatibility. In case of Asterisk only the symbol {{CRYPTO_set_id_callback}} is affected.

*Steps to reproduce* (Ubuntu 18.04 LTS){code}
sudo apt install build-essential pkg-config libedit-dev libjansson-dev libsqlite3-dev uuid-dev libxslt1-dev
sudo apt install libssl-dev
cd ~/Downloads
wget www.openssl.org/source/openssl-1.0.2o.tar.gz
tar -zxf ./openssl-*.tar.gz
cd ./openssl-*
./config shared no-deprecated
make
export SSL_HOME=$PWD
cd ~/Downloads
wget downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar -zxf ./asterisk-*.tar.gz
cd ./asterisk-*
LDFLAGS="-Wl,-rpath $SSL_HOME" ./configure --with-crypto=$SSL_HOME --with-ssl=$SSL_HOME
make{code}OpenSSL headers in the system were required {{sudo apt install libssl-dev}} because in Asterisk {{--with-ssl}} does not work correctly, yet. See ASTERISK-27865 and its section Notes whether this is still needed.

The attached patch follows the approach several others:
* [FFmpeg|https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2011-November/043136.html]
* [Libav|https://patches.libav.org/patch/11479/] (same author)
* [Asio C++ Library|https://github.com/chriskohlhoff/asio/issues/126] (same source)
* [OpenSSL Users mailing list|https://www.mail-archive.com/openssl-users@openssl.org/msg69328.html]

As side effects, this patch:
* adds the header file for OPENSSL_VERSION_NUMBER
* updates the header includes with the help of [iwyu|https://issues.asterisk.org/jira/browse/ASTERISK-25591] (added pthread and asterisk/logger)
* removes {{defined(OPENSSL_VERSION_NUMBER)}} because that is a left-over from commit [2c8d076|https://github.com/asterisk/asterisk/commit/2c8d0764de87037ce52656e13b36de5d9876aeaa]
* moves {{LIBRESSL_VERSION_NUMBER}} to first position because LibreSSL changed its {{OPENSSL_VERSION_NUMBER}} several times
* removes MODULEINFO, because libasteriskssl is not a module
* updates the copyright to the current year

*Notes*
The attached patch was tested with OpenSSL 1.1.0h, 1.0.2o, 1.0.1u, 1.0.0s, and 0.9.8zh, both variants (no-deprecated and enable-deprecated). This patch changes only the file {{main/libasteriskssl.c}}. Other files must be touched to get {{no-deprecated}} working, see ASTERISK-27865 and its section Notes for details.
Comments:By: Asterisk Team (asteriskteam) 2018-05-20 06:32:56.819-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Friendly Automation (friendly-automation) 2018-05-29 12:08:43.626-0500

Change 9021 merged by Joshua Colp:
libasteriskssl: Allow OpenSSL 1.0.2 configured with no-deprecated.

[https://gerrit.asterisk.org/9021|https://gerrit.asterisk.org/9021]

By: Friendly Automation (friendly-automation) 2018-05-29 12:08:54.854-0500

Change 9019 merged by Joshua Colp:
libasteriskssl: Allow OpenSSL 1.0.2 configured with no-deprecated.

[https://gerrit.asterisk.org/9019|https://gerrit.asterisk.org/9019]

By: Friendly Automation (friendly-automation) 2018-05-29 12:09:10.514-0500

Change 9020 merged by Joshua Colp:
libasteriskssl: Allow OpenSSL 1.0.2 configured with no-deprecated.

[https://gerrit.asterisk.org/9020|https://gerrit.asterisk.org/9020]