[asterisk-bugs] [JIRA] (ASTERISK-24436) Missing header in res/res_srtp.c when compiling against libsrtp-1.5.0

Alexander Traud (JIRA) noreply at issues.asterisk.org
Tue Jun 7 05:36:56 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Traud updated ASTERISK-24436:
---------------------------------------

    Attachment: asterisk_with_libsrtp1.5.x.patch

Although the [intro|https://github.com/cisco/libsrtp/blob/master/doc/intro.txt] of libSRTP still suggests to use {{crypto_get_random}}, it was moved to a private header as of [commit 4494760|https://github.com/cisco/libsrtp/commits/1_5_x_throttle/include/srtp.h]. Furthermore according to several commit messages ([1|https://github.com/cisco/libsrtp/commit/339b61dce67b78cd5f8c2b08194b9fadbdf8a832], [2|https://github.com/cisco/libsrtp/commit/fb838419fa133be8140ed0c0a50fa305dfa0a671]), the random-number generator (RNG) of the libSRTP 1.5.x branch might not be maintained anymore either. Because Asterisk uses OpenSSL anyway, the attached patch does not change the inclusion for a private header file but instead goes for OpenSSL. PJSIP took the [same approach|http://trac.pjsip.org/repos/changeset/5079/pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c]. Please, consider this patch for inclusion.

> Missing header in res/res_srtp.c when compiling against libsrtp-1.5.0
> ---------------------------------------------------------------------
>
>                 Key: ASTERISK-24436
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24436
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_srtp
>    Affects Versions: 11.13.0
>         Environment: CentOS 6.5 x86_64, Asterisk 11.13.0 and libsrtp 1.5.0
>            Reporter: Patrick Laimbock
>            Severity: Minor
>      Target Release: 1.8.32.0, 11.14.0, 12.7.0, 13.1.0
>
>         Attachments: asterisk_with_libsrtp1.5.x.patch
>
>
> Compilation of 11.13.0 against libsrtp 1.5.0 fails with the following error:
> gcc -o res_srtp.o -c res_srtp.c -MD -MT res_srtp.o -MF .res_srtp.o.d -MP -pthread -I/home/mockbuild/rpmbuild/BUILD/asterisk-11.13.0/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Werror-implicit-function-declaration  -I/usr/include/libxml2 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations     -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -DAST_MODULE=\"res_srtp\"   -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Werror-implicit-function-declaration
> res_srtp.c: In function 'ast_srtp_get_random':
> res_srtp.c:307: error: implicit declaration of function 'crypto_get_random'
> make[1]: *** [res_srtp.o] Error 1
> This seems to be caused by a missing header. The following pseudo patch fixes the problem for me:
> ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413587 $")
> #include <srtp/srtp.h>
> +#include <srtp/crypto_kernel.h>
> #include "asterisk/lock.h"



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list