Date: Wed, 24 Oct 2018 13:03:05 +0000 (UTC) From: Alex Dupre <ale@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482905 - head/security/php56-openssl/files Message-ID: <201810241303.w9OD35CF058806@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <cedric@precidata.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810241303.w9OD35CF058806>