aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-04-17 11:35:18 +0200
committerTobias Brunner <tobias@strongswan.org>2013-05-08 15:02:40 +0200
commit651d5ab8e72f2dd2ce40544b59d974007afdc880 (patch)
tree625c9e49045ec0c4e6bb0bce90e9259c757ee678 /src/libstrongswan
parent02116fdc2dd312a86d48e9dcf409d6cdfcf6822b (diff)
downloadstrongswan-651d5ab8e72f2dd2ce40544b59d974007afdc880.tar.bz2
strongswan-651d5ab8e72f2dd2ce40544b59d974007afdc880.tar.xz
openssl: Properly cleanup OpenSSL library
Diffstat (limited to 'src/libstrongswan')
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_plugin.c9
-rw-r--r--src/libstrongswan/utils/leak_detective.c7
2 files changed, 7 insertions, 9 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c
index 97d57471d..2371008fd 100644
--- a/src/libstrongswan/plugins/openssl/openssl_plugin.c
+++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c
@@ -14,6 +14,7 @@
* for more details.
*/
+#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/conf.h>
#include <openssl/rand.h>
@@ -445,11 +446,15 @@ METHOD(plugin_t, get_features, int,
METHOD(plugin_t, destroy, void,
private_openssl_plugin_t *this)
{
+ CONF_modules_free();
+ OBJ_cleanup();
+ EVP_cleanup();
#ifndef OPENSSL_NO_ENGINE
ENGINE_cleanup();
#endif /* OPENSSL_NO_ENGINE */
- EVP_cleanup();
- CONF_modules_free();
+ CRYPTO_cleanup_all_ex_data();
+ ERR_remove_thread_state(NULL);
+ ERR_free_strings();
threading_cleanup();
diff --git a/src/libstrongswan/utils/leak_detective.c b/src/libstrongswan/utils/leak_detective.c
index 26e3e43fc..4f3c9f78b 100644
--- a/src/libstrongswan/utils/leak_detective.c
+++ b/src/libstrongswan/utils/leak_detective.c
@@ -475,13 +475,6 @@ char *whitelist[] = {
"Curl_client_write",
/* ClearSilver */
"nerr_init",
- /* OpenSSL */
- "RSA_new_method",
- "DH_new_method",
- "ENGINE_load_builtin_engines",
- "OPENSSL_config",
- "ecdsa_check",
- "ERR_put_error",
/* libgcrypt */
"gcry_control",
"gcry_check_version",