From owner-svn-ports-head@freebsd.org Mon Jun 11 18:35:26 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 899891004CD2; Mon, 11 Jun 2018 18:35:26 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AFDF755F0; Mon, 11 Jun 2018 18:35:26 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 182E51F30F; Mon, 11 Jun 2018 18:35:26 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5BIZPMH016045; Mon, 11 Jun 2018 18:35:25 GMT (envelope-from brnrd@FreeBSD.org) Received: (from brnrd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5BIZP2r016044; Mon, 11 Jun 2018 18:35:25 GMT (envelope-from brnrd@FreeBSD.org) Message-Id: <201806111835.w5BIZP2r016044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brnrd set sender to brnrd@FreeBSD.org using -f From: Bernard Spil Date: Mon, 11 Jun 2018 18:35:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r472199 - head/databases/sqlcipher/files X-SVN-Group: ports-head X-SVN-Commit-Author: brnrd X-SVN-Commit-Paths: head/databases/sqlcipher/files X-SVN-Commit-Revision: 472199 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 18:35:26 -0000 Author: brnrd Date: Mon Jun 11 18:35:25 2018 New Revision: 472199 URL: https://svnweb.freebsd.org/changeset/ports/472199 Log: databases/sqlcipher: Fix build with LibreSSL 2.7 - LibreSSL 2.7 adds OpenSSL 1.1 ABI PR: 228248 Approved by: maintainer (jharris widomaker com) Added: head/databases/sqlcipher/files/ head/databases/sqlcipher/files/patch-sqlcipher-libressl-2.7 (contents, props changed) Added: head/databases/sqlcipher/files/patch-sqlcipher-libressl-2.7 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/sqlcipher/files/patch-sqlcipher-libressl-2.7 Mon Jun 11 18:35:25 2018 (r472199) @@ -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 {