title: How to config openssl engine aes-ni in nginx
body: <p>I use engine AES-NI increase performance of openssl speed (hardware acceleration) with my chip is supported engine AES-NI (Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz).</p>
  
  <p>I try install openssl version <strong><em><a href="https://github.com/PeterMosmans/openssl/tree/1.0.2-chacha" rel="nofollow">1.0.2-chacha</a></em></strong> and <strong><em><a href="https://www.openssl.org/source/openssl-1.0.1l.tar.gz" rel="nofollow">1.0.1l</a></em></strong> </p>
  
  <p>Version 1.0.2 chacha when test speed openssl with command:</p>
  
  <pre><code>openssl speed aes-256-cbc
  </code></pre>
  
  <p>then error:</p>
  
  <blockquote>
    <p>Error: bad option or value</p>
  </blockquote>
  
  <p>Version 1.0.1 when config with nginx then error:</p>
  
  <blockquote>
    <p>nginx: [warn] ENGINE_by_id("aesni") failed (SSL: error:25066067:DSO
    support routines:DLFCN_LOAD:could not load the shared
    library:filename(/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: cannot
    open shared object file: No such file or directory error:25070067:DSO
    support routines:DSO_load:could not load the shared library
    error:260B6084:engine routines:DYNAMIC_LOAD:dso not found
    error:2606A074:engine routines:ENGINE_by_id:no such engine:id=aesni)</p>
  </blockquote>
  
  <p>I know for versions of openssl >= 1.0.1, AES-NI does not work via an engine and will not show up in the openssl engine command. It is active by default on the supported hardware.</p>
  
  <p>I see one command in <a href="https://www.ruby-forum.com/topic/6873426#1168394" rel="nofollow">https://www.ruby-forum.com/topic/6873426#1168394</a> say "no configuration option and it will work as long as your cpu supports it". </p>
  
  <p>But I do not find official sources.</p>
  
  <p>Please suggest a solution for use version openssl and config with nginx.</p>