简体   繁体   English

PJSIP 构建找不到 OpenSSL AES GCM 支持

[英]PJSIP build doesn't find OpenSSL AES GCM support

When I try to build PJSIP 2.6 on Lubuntu 16.04 x86_64, it doesn't find AES GCM support, even though I have OpenSSL installed.当我尝试在 Lubuntu 16.04 x86_64 上构建 PJSIP 2.6 时,它没有找到 AES GCM 支持,即使我安装了 OpenSSL。

./configure | grep -e ssl -e SSL -e crypto 
checking for OpenSSL installations..
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking for ERR_load_BIO_strings in -lcrypto... yes
checking for SSL_CTX_new in -lssl... yes
OpenSSL library found, SSL support enabled
OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos

I also tried building a separate version of OpenSSL (1.1.0e) and the behavior is simillar.我还尝试构建一个单独版本的 OpenSSL (1.1.0e) 并且行为是相似的。 How can I enable AES GCM support?如何启用 AES GCM 支持?

What solved the problem to me was to manually compile openssl-1.0.2k.解决问题的方法是手动编译 openssl-1.0.2k。 I don't know why ubuntu default (1.0.2g) would not work, but the "k" managed to work.我不知道为什么 ubuntu 默认值 (1.0.2g) 不起作用,但“k”设法起作用。 The 1.1.0 version didn't work because the AES GCM would be tested with the following code: 1.1.0 版本不起作用,因为 AES GCM 将使用以下代码进行测试:

#include <openssl/evp.h>
int main () {
    EVP_CIPHER_CTX ctx;
    EVP_aes_128_gcm();
    return 0;
}

Whereas both Ubuntu implementation and OpenSSL 1.1.0> expect EVP_CIPHER_CTX variables to be declared as a pointer (or perhaps initialized?).而 Ubuntu 实现和 OpenSSL 1.1.0> 都期望EVP_CIPHER_CTX变量被声明为指针(或者可能被初始化?)。 Both builds would break and the configure would understand it as no support to the cipher.两个构建都会中断,配置会将其理解为不支持密码。 Changing the test wouldn't work either because that's how it was implemented internally.更改测试也不起作用,因为这是内部实施的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM