diff options
author | Matt Weber <matthew.weber@rockwellcollins.com> | 2019-02-06 06:09:18 -0600 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2019-02-11 12:12:29 +0100 |
commit | c96156add9b83e5f381edd89301ffb89ea9e0a86 (patch) | |
tree | f5c7a4b7a48f5ae13c3e2a4247dc8308e4c29330 /package/sqlcipher/0002-Guard-OpenSSL-init-and-cleanup-routines-on-versions-.patch | |
parent | d7690d3bfa4edde7e06e9ef457e765d0f6148923 (diff) | |
download | buildroot-c96156add9b83e5f381edd89301ffb89ea9e0a86.tar.gz buildroot-c96156add9b83e5f381edd89301ffb89ea9e0a86.zip |
package/sqlcipher: add OpenSSL 1.1.x compatibility
Fixes
http://autobuild.buildroot.net/results/5e2/5e2c3178d8a6e11b1af1c37144737097730ba222/
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/sqlcipher/0002-Guard-OpenSSL-init-and-cleanup-routines-on-versions-.patch')
-rw-r--r-- | package/sqlcipher/0002-Guard-OpenSSL-init-and-cleanup-routines-on-versions-.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/package/sqlcipher/0002-Guard-OpenSSL-init-and-cleanup-routines-on-versions-.patch b/package/sqlcipher/0002-Guard-OpenSSL-init-and-cleanup-routines-on-versions-.patch new file mode 100644 index 0000000000..1585b8d450 --- /dev/null +++ b/package/sqlcipher/0002-Guard-OpenSSL-init-and-cleanup-routines-on-versions-.patch @@ -0,0 +1,42 @@ +From 6b4dbecbcfe35d36fea264c04c41b338852d4e88 Mon Sep 17 00:00:00 2001 +From: Nick Parker <nparker@zetetic.net> +Date: Wed, 1 Mar 2017 15:35:43 -0600 +Subject: [PATCH] Guard OpenSSL init and cleanup routines on versions less + than 1.1.0 + +(cherry picked from commit 1c495b933cee3381f1ea6a70edcbcda1754d7409) +Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com> + +Conflicts: + src/crypto_openssl.c +--- + src/crypto_openssl.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/crypto_openssl.c b/src/crypto_openssl.c +index 6822325..09bc2a2 100644 +--- a/src/crypto_openssl.c ++++ b/src/crypto_openssl.c +@@ -102,7 +102,9 @@ static int sqlcipher_openssl_activate(void *ctx) { + + if(openssl_init_count == 0 && openssl_external_init == 0) { + /* if the library was not externally initialized, then should be now */ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + OpenSSL_add_all_algorithms(); ++#endif + } + + #ifndef SQLCIPHER_OPENSSL_NO_MUTEX_RAND +@@ -131,7 +133,9 @@ static int sqlcipher_openssl_deactivate(void *ctx) { + Note: this code will only be reached if OpensSSL_add_all_algorithms() + is called by SQLCipher internally. This should prevent SQLCipher from + "cleaning up" openssl when it was initialized externally by the program */ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_cleanup(); ++#endif + } + #ifndef SQLCIPHER_OPENSSL_NO_MUTEX_RAND + sqlite3_mutex_free(openssl_rand_mutex); +-- +1.9.1 + |