From 6fec5c62c44f2388bd3aba955b1e810849240288 Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Wed, 9 Nov 2016 10:15:40 -0600 Subject: [PATCH] Reset OpenSSL external init flag during deactivate --- src/crypto_openssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crypto_openssl.c b/src/crypto_openssl.c index cb4d55e..97a791d 100644 --- a/src/crypto_openssl.c +++ b/src/crypto_openssl.c @@ -117,6 +117,8 @@ static int sqlcipher_openssl_deactivate(void *ctx) { is called by SQLCipher internally. This should prevent SQLCipher from "cleaning up" openssl when it was initialized externally by the program */ EVP_cleanup(); + } else { + openssl_external_init = 0; } #ifndef SQLCIPHER_OPENSSL_NO_MUTEX_RAND sqlite3_mutex_free(openssl_rand_mutex);