[Home]

Summary:ASTERISK-27906: [patch] res_crypto: Allow OpenSSL configured with no-deprecated.
Reporter:Alexander Traud (traud)Labels:
Date Opened:2018-06-08 03:59:39Date Closed:2018-06-12 08:29:23
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_crypto
Versions:13.21.0 15.4.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
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. However, this reveals that Asterisk did not include its used OpenSSL headers correctly. In case of the module {{res_crypto.c}}, the header {{rsa.h}} was missing.

*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.

As side effect, this patch updates all remaining header includes with the help of [iwyu|https://issues.asterisk.org/jira/browse/ASTERISK-25591]:
*added*
* openssl/pem
* openssl/rsa (that was the origin reason)
* openssl/sha
* asterisk/compat
* asterisk/linkedlists
* asterisk/logger
* asterisk/options

*removed*
* asterisk/lock

In July 2007, Commit [84f325a|https://github.com/asterisk/asterisk/commit/84f325abb2e866a9a04545886f80256bcb053f75#diff-a45504f5141683b14f835a34a15ba55d] removed all symbols which used {{asterisk/lock.h}}, which explains why neither iwyu nor I find any use for it.
Comments:By: Asterisk Team (asteriskteam) 2018-06-08 03:59:40.887-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-06-12 08:29:26.645-0500

Change 9143 merged by Joshua Colp:
res_crypto: Allow OpenSSL configured with no-deprecated.

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

By: Friendly Automation (friendly-automation) 2018-06-12 08:30:16.938-0500

Change 9142 merged by Joshua Colp:
res_crypto: Allow OpenSSL configured with no-deprecated.

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

By: Friendly Automation (friendly-automation) 2018-06-12 08:42:37.648-0500

Change 9141 merged by Joshua Colp:
res_crypto: Allow OpenSSL configured with no-deprecated.

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