]> git.ipfire.org Git - people/ms/strongswan.git/commit
openssl: Don't unload providers
authorTobias Brunner <tobias@strongswan.org>
Wed, 23 Feb 2022 16:29:02 +0000 (17:29 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 24 Feb 2022 14:03:09 +0000 (15:03 +0100)
commit3eecd40cec6415fc033f8d9141ab652047e71524
tree710a86453d8a90e149d93eaa70a8b2026d7b0ac5
parente69438450f59570c2b80c7f7ef3d5f3071bc7886
openssl: Don't unload providers

There is a conflict between atexit() handlers registered by OpenSSL and
some executables (e.g. swanctl or pki) to deinitialize libstrongswan.
Because plugins are usually loaded after atexit() has been called, the
handler registered by OpenSSL will run before our handler.  So when the
latter destroys the plugins it's a bad idea to try to access any OpenSSL
objects as they might already be invalid.

Fixes: f556fce16b60 ("openssl: Load "legacy" provider in OpenSSL 3 for algorithms like MD4, DES etc.")
Closes strongswan/strongswan#921
src/libstrongswan/plugins/openssl/openssl_plugin.c