aboutsummaryrefslogtreecommitdiff
path: root/databases/sqlcipher
diff options
context:
space:
mode:
authorBernard Spil <brnrd@FreeBSD.org>2018-06-11 18:35:25 +0000
committerBernard Spil <brnrd@FreeBSD.org>2018-06-11 18:35:25 +0000
commit6e9fec3207bc30f8670e761df0f944362121224a (patch)
tree17e0c03528ecd425d4e2a93d2b62055ec4690d01 /databases/sqlcipher
parent82753dfe3f8af4ac0dc0da51bf70c4358e6874c1 (diff)
downloadports-6e9fec3207bc30f8670e761df0f944362121224a.tar.gz
ports-6e9fec3207bc30f8670e761df0f944362121224a.zip
databases/sqlcipher: Fix build with LibreSSL 2.7
- LibreSSL 2.7 adds OpenSSL 1.1 ABI PR: 228248 Approved by: maintainer (jharris widomaker com)
Notes
Notes: svn path=/head/; revision=472199
Diffstat (limited to 'databases/sqlcipher')
-rw-r--r--databases/sqlcipher/files/patch-sqlcipher-libressl-2.731
1 files changed, 31 insertions, 0 deletions
diff --git a/databases/sqlcipher/files/patch-sqlcipher-libressl-2.7 b/databases/sqlcipher/files/patch-sqlcipher-libressl-2.7
new file mode 100644
index 000000000000..bda45d959ea3
--- /dev/null
+++ b/databases/sqlcipher/files/patch-sqlcipher-libressl-2.7
@@ -0,0 +1,31 @@
+diff --git a/src/crypto_openssl.c b/src/crypto_openssl.c
+index a45db3b..4344076 100644
+--- src/crypto_openssl.c.orig
++++ src/crypto_openssl.c
+@@ -47,7 +47,7 @@ static unsigned int openssl_external_init = 0;
+ static unsigned int openssl_init_count = 0;
+ static sqlite3_mutex* openssl_rand_mutex = NULL;
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)
+ static HMAC_CTX *HMAC_CTX_new(void)
+ {
+ HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));
+@@ -117,7 +117,7 @@ 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
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)
+ OpenSSL_add_all_algorithms();
+ #endif
+ }
+@@ -154,7 +154,7 @@ 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
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)
+ EVP_cleanup();
+ #endif
+ } else {