Compile asterisk 13 with chan_sip on Debian 9

When I try to compile and install asterisk certified 13.13 cert4 I get the following error:

tcptls.c: In function ‘tcptls_stream_close’:
tcptls.c:401:20: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’
    if (!stream->ssl->server) {
                    ^~
tcptls.c:404:5: warning: ‘ERR_remove_thread_state’ is deprecated [-Wdeprecated-declarations]
     ERR_remove_thread_state(NULL);
     ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from /usr/src/asterisk-certified-13.13-cert4/include/asterisk/tcptls.h:66,
                 from tcptls.c:44:
/usr/include/openssl/err.h:247:1: note: declared here
 DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *))
 ^
tcptls.c: In function ‘__ssl_setup’:
tcptls.c:819:31: warning: implicit declaration of function ‘SSLv2_client_method’ [-Wimplicit-function-declaration]
    cfg->ssl_ctx = SSL_CTX_new(SSLv2_client_method());
                               ^~~~~~~~~~~~~~~~~~~
tcptls.c:819:31: warning: passing argument 1 of ‘SSL_CTX_new’ makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/src/asterisk-certified-13.13-cert4/include/asterisk/tcptls.h:66:0,
                 from tcptls.c:44:
/usr/include/openssl/ssl.h:1321:17: note: expected ‘const SSL_METHOD * {aka const struct ssl_method_st *}’ but argument is of type ‘int’
 __owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
                 ^~~~~~~~~~~
tcptls.c:829:4: warning: ‘TLSv1_client_method’ is deprecated [-Wdeprecated-declarations]
    cfg->ssl_ctx = SSL_CTX_new(TLSv1_client_method());
    ^~~
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from /usr/src/asterisk-certified-13.13-cert4/include/asterisk/tcptls.h:66,
                 from tcptls.c:44:
/usr/include/openssl/ssl.h:1614:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) /* TLSv1.0 */
 ^
/usr/src/asterisk-certified-13.13-cert4/Makefile.rules:149: fallo en las instrucciones para el objetivo 'tcptls.o'
make[1]: *** [tcptls.o] Error 1
Makefile:402: fallo en las instrucciones para el objetivo 'main'
make: *** [main] Error 2

It is probably related to change version of OpenSSL to 1.1.0 on Debian 9:

Package: libssl-dev
Version: 1.1.0f-3

I want to install LTS version of Asterisk on the latest stable version of Debian . Is posible solve this problem without changing version of SSL?

Regards

The Asterisk 13 branch itself and releases from it is LTS. Certified is generally for Digium support agreement customers, and is released less often and receives fewer changes.

2 Likes

Hi,

Sorry, this problem it’s solved on the last version of Asterisk 13 . I use this version and wait to update to the next certified version . Thanks.

Regards.