【问题标题】:How to config openssl engine aes-ni in nginx如何在 nginx 中配置 openssl 引擎 aes-ni
【发布时间】:2015-05-10 11:31:55
【问题描述】:

我使用引擎 AES-NI 来提高 openssl 速度(硬件加速)的性能,而我的芯片支持引擎 AES-NI(Intel(R) Xeon(R) CPU E5620 @ 2.40GHz)。

我尝试安装 openssl 版本 1.0.2-chacha1.0.1l

版本 1.0.2 查查时用命令测试速度 openssl:

openssl speed aes-256-cbc

然后错误:

错误:错误的选项或值

版本 1.0.1 配置 nginx 时出现错误:

nginx: [warn] ENGINE_by_id("aesni") 失败 (SSL: error:25066067:DSO 支持例程:DLFCN_LOAD:could not load the shared 库:文件名(/usr/lib/x86_64-linux-gnu/openssl-1.0.1/engines/libaesni.so): /usr/lib/x86_64-linux-gnu/openssl-1.0.1/engines/libaesni.so:不能 打开共享对象文件:没有这样的文件或目录错误:25070067:DSO 支持例程:DSO_load:无法加载共享库 错误:260B6084:引擎例程:DYNAMIC_LOAD:dso 未找到 错误:2606A074:引擎例程:ENGINE_by_id:没有这样的引擎:id=aesni)

我知道对于 openssl >= 1.0.1 的版本,AES-NI 不能通过引擎工作,并且不会显示在 openssl 引擎命令中。默认情况下,它在受支持的硬件上处于活动状态。

我在https://www.ruby-forum.com/topic/6873426#1168394 中看到一个命令说“没有配置选项,只要你的 cpu 支持它就可以工作”。

但我没有找到官方来源。

请建议使用版本 openssl 和 nginx 配置的解决方案。

【问题讨论】:

    标签: nginx openssl aes-ni


    【解决方案1】:

    在 OpenSSL >= 1.0.1 中,EVP 界面默认启用 AES-NI,并且没有 aesni 引擎。因此,在 nginx 中,没有为 OpenSSL 版本 >= 1.0.1 启用 AES-NI 的配置选项,因为它在 OpenSSL 中默认启用(只要您的 CPU 支持它)。对于

    [http://openssl.6102.n7.nabble.com/having-a-lot-of-troubles-trying-to-get-AES-NI-working-tp44285p44301.html]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-06
      • 1970-01-01
      • 1970-01-01
      • 2016-11-12
      • 1970-01-01
      • 2012-09-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多