From owner-svn-ports-head@freebsd.org Wed Oct 24 13:03:05 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 C4F7210797CB; Wed, 24 Oct 2018 13:03:05 +0000 (UTC) (envelope-from ale@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 7B98D86698; Wed, 24 Oct 2018 13:03:05 +0000 (UTC) (envelope-from ale@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 7337E2AAF8; Wed, 24 Oct 2018 13:03:05 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9OD35lt058807; Wed, 24 Oct 2018 13:03:05 GMT (envelope-from ale@FreeBSD.org) Received: (from ale@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9OD35CF058806; Wed, 24 Oct 2018 13:03:05 GMT (envelope-from ale@FreeBSD.org) Message-Id: <201810241303.w9OD35CF058806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ale set sender to ale@FreeBSD.org using -f From: Alex Dupre Date: Wed, 24 Oct 2018 13:03:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482905 - head/security/php56-openssl/files X-SVN-Group: ports-head X-SVN-Commit-Author: ale X-SVN-Commit-Paths: head/security/php56-openssl/files X-SVN-Commit-Revision: 482905 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.29 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: Wed, 24 Oct 2018 13:03:06 -0000 Author: ale Date: Wed Oct 24 13:03:05 2018 New Revision: 482905 URL: https://svnweb.freebsd.org/changeset/ports/482905 Log: Fix build with libressl. PR: 232519 Submitted by: cedric Modified: head/security/php56-openssl/files/patch-openssl11 Modified: head/security/php56-openssl/files/patch-openssl11 ============================================================================== --- head/security/php56-openssl/files/patch-openssl11 Wed Oct 24 12:48:46 2018 (r482904) +++ head/security/php56-openssl/files/patch-openssl11 Wed Oct 24 13:03:05 2018 (r482905) @@ -19,7 +19,7 @@ diff -rupN openssl.c openssl.c #endif +/* {{{ OpenSSL compatibility functions and macros */ -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L +#define EVP_PKEY_get0_RSA(_pkey) _pkey->pkey.rsa +#define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh +#define EVP_PKEY_get0_DSA(_pkey) _pkey->pkey.dsa @@ -131,7 +131,7 @@ diff -rupN openssl.c openssl.c + return 1; +} + -+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10002000L +#define EVP_PKEY_id(_pkey) _pkey->type +#define EVP_PKEY_base_id(_key) EVP_PKEY_type(_key->type) + @@ -162,7 +162,7 @@ diff -rupN openssl.c openssl.c /* }}} */ -#ifdef PHP_WIN32 -+#if defined(PHP_WIN32) || (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) ++#if defined(PHP_WIN32) || OPENSSL_VERSION_NUMBER >= 0x10100000L #define PHP_OPENSSL_RAND_ADD_TIME() ((void) 0) #else #define PHP_OPENSSL_RAND_ADD_TIME() php_openssl_rand_add_timeval() @@ -170,7 +170,7 @@ diff -rupN openssl.c openssl.c mdtype = (EVP_MD *) EVP_md2(); break; #endif -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L case OPENSSL_ALGO_DSS1: mdtype = (EVP_MD *) EVP_dss1(); break; @@ -195,7 +195,7 @@ diff -rupN openssl.c openssl.c #ifdef HAVE_OPENSSL_MD2_H REGISTER_LONG_CONSTANT("OPENSSL_ALGO_MD2", OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT); #endif -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L REGISTER_LONG_CONSTANT("OPENSSL_ALGO_DSS1", OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT); +#endif #if OPENSSL_VERSION_NUMBER >= 0x0090708fL @@ -279,7 +279,7 @@ diff -rupN openssl.c openssl.c } - tpubkey=X509_REQ_get_pubkey(csr); -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L + /* Due to changes in OpenSSL 1.1 related to locking when decoding CSR, + * the pub key is not changed after assigning. It means if we pass + * a private key, it will be returned including the private part. @@ -290,7 +290,7 @@ diff -rupN openssl.c openssl.c + /* Retrieve the public key from the CSR */ + tpubkey = X509_REQ_get_pubkey(csr); + -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L + /* We need to free the CSR as it was duplicated */ + X509_REQ_free(csr); +#endif