Solved FreeBSD 11.2 - OpenSSL without AESNI?

Code:
user@gt:~ % openssl version
OpenSSL 1.0.2k-freebsd  26 Jan 2017
user@gt:~ % openssl speed -evp aes-256-gcm -engine aesni
invalid engine "aesni"
34380834184:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/dso/dso_dlfcn.c:187:filename(/usr/lib/engines/libaesni.so): Cannot open "/usr/lib/engines/libaesni.so"
34380834184:error:25070067:DSO support routines:DSO_load:could not load the shared library:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/dso/dso_lib.c:233:
34380834184:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/engine/eng_dyn.c:467:
34380834184:error:2606A074:engine routines:ENGINE_by_id:no such engine:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/engine/eng_list.c:390:id=aesni
34380834184:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/dso/dso_dlfcn.c:187:filename(libaesni.so): Shared object "libaesni.so" not found, required by "openssl"
34380834184:error:25070067:DSO support routines:DSO_load:could not load the shared library:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/dso/dso_lib.c:233:
34380834184:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/engine/eng_dyn.c:467:
Code:
user@gt:~ % kldstat
Id Refs Address            Size     Name
 1    8 0xffffffff80200000 1faf1f0  kernel
 2    1 0xffffffff821b1000 b3e8     aesni.ko
 
I'm back with the same issue.

Code:
user@gt:~ % openssl version
OpenSSL 1.0.2o-freebsd  27 Mar 2018
user@gt:~ % openssl speed -evp aes-256-gcm -engine aesni
invalid engine "aesni"
34380880456:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:/usr/src/crypto/openssl/crypto/dso/dso_dlfcn.c:187:filename(/usr/lib/engines/libaesni.so): Cannot open "/usr/lib/engines/libaesni.so"
34380880456:error:25070067:DSO support routines:DSO_load:could not load the shared library:/usr/src/crypto/openssl/crypto/dso/dso_lib.c:233:
34380880456:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:/usr/src/crypto/openssl/crypto/engine/eng_dyn.c:467:
34380880456:error:2606A074:engine routines:ENGINE_by_id:no such engine:/usr/src/crypto/openssl/crypto/engine/eng_list.c:390:id=aesni
34380880456:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:/usr/src/crypto/openssl/crypto/dso/dso_dlfcn.c:187:filename(libaesni.so): Shared object "libaesni.so" not found, required by "openssl"
34380880456:error:25070067:DSO support routines:DSO_load:could not load the shared library:/usr/src/crypto/openssl/crypto/dso/dso_lib.c:233:
34380880456:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:/usr/src/crypto/openssl/crypto/engine/eng_dyn.c:467:
user@gt:~ % kldstat
Id Refs Address            Size     Name
 1   10 0xffffffff80200000 2036810  kernel
 2    1 0xffffffff82238000 af98     aesni.ko

Any suggestions?
 
If you are willing to enable AESNI, just load the module: kldload aesni, and/or add it to /etc/load.conf:

Code:
aesni_load="YES"

:)
 
You're specifying a dynamically-loaded encryption shared library with "-engine aesni" that hasn't existed since v1.0.1. The aesni kernel module is completely different.
I think OpenSSL works out for itself if the instructions are supported on the CPU and if they are uses them directly, unless it was configured with "no-asm".
 
Back
Top