Hi Juanito,
So, I recompiled openvpn against the new openssl version. I took some tries, but I think I managed. OpenVPN works, but I don't think it's using HW acceleration. I don't get better results on CPE usage or performance. Below some output from troubleshooting.
1) OpenVPN is compiled against OpenSSL 1.1.1b, as seen from the version output
$ openvpn --version
OpenVPN 2.4.3 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on May 5 2019
library versions: OpenSSL 1.1.1b 26 Feb 2019, LZO 2.08
Originally developed by James Yonan
Copyright (C) 2002-2017 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_async_push='no' enable_comp_stub='no' enable_crypto='yes' enable_crypto_ofb_cfb='yes' enable_debug='yes'
enable_def_auth='yes' enable_dlopen='unknown' enable_dlopen_self='unknown' enable_dlopen_self_static='unknown' enable_fast_install='yes'
enable_fragment='yes' enable_iproute2='no' enable_libtool_lock='yes' enable_lz4='yes' enable_lzo='yes' enable_management='yes'
enable_multi='yes' enable_multihome='yes' enable_pam_dlopen='no' enable_pedantic='no' enable_pf='yes' enable_pkcs11='no'
enable_plugin_auth_pam='yes' enable_plugin_down_root='yes' enable_plugins='yes' enable_port_share='yes' enable_selinux='no'
enable_server='yes' enable_shared='yes' enable_shared_with_static_runtimes='no' enable_small='no' enable_static='yes' enable_strict='no'
enable_strict_options='no' enable_systemd='no' enable_werror='no' enable_win32_dll='yes' enable_x509_alt_username='no'
with_aix_soname='aix' with_crypto_library='openssl' with_gnu_ld='yes' with_mem_check='no' with_sysroot='no'
2) I checked what OpenVPN is linking to and the correct (new) versions of libssl and libcrypto seem to be used:
# ldd /usr/local/sbin/openvpn
linux-vdso.so.1 (0x00007ffe149e3000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00007f90b6393000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00007f90b637d000)
liblzo2.so.2 => /usr/local/lib/liblzo2.so.2 (0x00007f90b6162000)
libssl.so.1.1 => /usr/local/lib/libssl.so.1.1 (0x00007f90b60e8000)
libcrypto.so.1.1 => /usr/local/lib/libcrypto.so.1.1 (0x00007f90b5e6e000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f90b5e69000)
libc.so.6 => /lib/libc.so.6 (0x00007f90b5ce9000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f90b5cd5000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f90b5cb7000)
/lib/ld-linux-x86-64.so.2 (0x00007f90b63b1000)
3) OpenSSL reports that the engine is available. I had to tweak openssl.cnf a bit to get this output. Although it reports that "Dynamic engine loading support" is unavailable. I have no idea if this is expected behavior.
# openssl engine -t -c
(dynamic) Dynamic engine loading support
[ unavailable ]
(padlock) VIA PadLock (no-RNG, ACE)
[AES-128-ECB, AES-128-CBC, AES-128-CFB, AES-128-OFB, AES-128-CTR, AES-192-ECB, AES-192-CBC, AES-192-CFB, AES-192-OFB, AES-192-CTR, AES-256-ECB, AES-256-CBC, AES-256-CFB, AES-256-OFB, AES-256-CTR]
[ available ]
# openssl engine padlock -t -c
(padlock) VIA PadLock (no-RNG, ACE)
[AES-128-ECB, AES-128-CBC, AES-128-CFB, AES-128-OFB, AES-128-CTR, AES-192-ECB, AES-192-CBC, AES-192-CFB, AES-192-OFB, AES-192-CTR, AES-256-ECB, AES-256-CBC, AES-256-CFB, AES-256-OFB, AES-256-CTR]
[ available ]
4) But OpenVPN reports that hardware crypto engines are not available.
# openvpn --show-engines
Sorry, OpenSSL hardware crypto engine functionality is not available.
I looked up this error message in the source code. It is printed if a statement #if HAVE_OPENSSL_ENGINE in the file crypto_openssl.c returns "false". But I can't find what I have to do to get this to "true". Is that a compile time flag I have to set?
Please advise, and thanks for the time invested.