Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: field 'ctx' has incomplete type EVP_CIPHER_CTX

Problem: I need to install Cepstral (tts engine) into Freeswitch running Debian 8. Freeswitch is already up and running, but I needed to build it from source in order for it create the mod_cepstral module.

When I run make this is the error I get:

In file included from ./crypto/include/prng.h:17:0,
                 from ./crypto/include/crypto_kernel.h:50,
                 from ./include/srtp.h:53,
                 from srtp/srtp.c:46:
./crypto/include/aes_icm_ossl.h:66:20: error: field ‘ctx’ has incomplete type
     EVP_CIPHER_CTX ctx;
                    ^~~
In file included from srtp/srtp.c:50:0:
./crypto/include/aes_gcm_ossl.h:58:18: error: field ‘ctx’ has incomplete type
   EVP_CIPHER_CTX ctx;
                  ^~~
Makefile:646: recipe for target 'srtp.lo' failed
make[1]: *** [srtp.lo] Error 1
make[1]: Leaving directory '/usr/src/freeswitch/libs/srtp'
Makefile:3931: recipe for target 'libs/srtp/libsrtp.la' failed
make: *** [libs/srtp/libsrtp.la] Error 2

I have been scouring the internet for solutions, but I am not a developer and this is way over my head. Any help would be appreciated.

like image 211
Joe Avatar asked Nov 27 '17 19:11

Joe


4 Answers

cause newer OpenSSL don't expose struct EVP_CIPHER_CTX ,

try this

EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
EVP_CIPHER_CTX_init(ctx);
//do sth here
//...
EVP_CIPHER_CTX_free(ctx);
like image 53
Xt Z Avatar answered Nov 13 '22 16:11

Xt Z


wget https://github.com/cisco/libsrtp/archive/v2.1.0.tar.gz
tar xfv v2.1.0.tar.gz
cd libsrtp-2.1.0
./configure --prefix=/usr --enable-openssl
make shared_library && sudo make install

Get the latest version of libsrtp.

like image 41
mikeb Avatar answered Nov 13 '22 17:11

mikeb


It appears that there is a dependency on OpenSSL, but the version of OpenSSL you are using is incompatible. You are using OpenSSL 1.1.0 but you need to use OpenSSL 1.0.2

like image 25
Matt Caswell Avatar answered Nov 13 '22 15:11

Matt Caswell


After talking with support at Cepstral, we determined that Jessie (Debian 8) is not yet fully compatible. I rebuilt the server with Debian 7 and it is working fine now.

like image 1
Joe Avatar answered Nov 13 '22 16:11

Joe