Summary:ASTERISK-27733: [patch] res_srtp: Add support for libsrtp2.x on openSUSE.
Reporter:Alexander Traud (traud)Labels:patch
Date Opened:2018-03-12 04:07:58Date Closed:2018-03-14 06:18:15
Versions:13.19.2 15.2.2 Frequency of
Environment:openSUSE Leap 42.3Attachments:( 0) libSRTP_2_x.patch
Description:{code}fatal error: srtp2/crypto_types.h: No such file or directory{code}With ASTERISK-26976, libSRTP 2.x can be linked. This is good because some platforms, like Arch Linux, do not have libSRTP 1.x pre-packaged anymore. Therefore, support for libSRTP 2.x is required to leverage sRTP within Asterisk. However, the added header file {{srtp2/crypto_types.h}} is a private header. On some platforms, this header is available. On some platforms, like openSUSE, this header was never available.

Since Asterisk 14, symbols from this header are not used anymore, because ASTERISK-26190 changed the code to leverage Crypto Suites, like {{crypto_policy_set_aes_cm_128_hmac_sha1}}. For Asterisk 14 and newer, the symbols got removed thanks to ASTERISK-27253. However, the include statement for that header remained for no reason. Consequently, the include statement can simply be removed, in those Asterisk versions.

ASTERISK-27253 was a new feature and therefore not backported to Asterisk 13. In Asterisk 13, the symbols {{AES_128_ICM}} and {{HMAC_SHA1}} are still used. However, with libSRTP 2.x no public header exists for these anymore.

Therefore, one approach is to move/define those symbols directly within the file {{res/srtp/srtp_compat.h}}. Another approach would be to change the code to leverage Crypto Suites. However, Crypto Suites were introduced with libSRTP 1.4.2 (May 2006) and changing this would lose compatibility with (even) older libSRTP versions.

The attached patch implements the mode/define-approach.
Comments:By: Asterisk Team (asteriskteam) 2018-03-12 04:08:01.178-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-03-14 06:18:16.121-0500

Change 8501 merged by Joshua Colp:
res_srtp: Add support for libsrtp2.x on openSUSE.


By: Friendly Automation (friendly-automation) 2018-03-14 06:26:12.072-0500

Change 8502 merged by Jenkins2:
res_srtp: Add support for libsrtp2.x on openSUSE.


By: Friendly Automation (friendly-automation) 2018-03-14 06:35:52.081-0500

Change 8503 merged by Joshua Colp:
res_srtp: Add support for libsrtp2.x on openSUSE.