diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2018-03-25 05:12:23 +0800 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2018-03-25 05:12:23 +0800 |
commit | f6ec15f572fb2008784ed7457709a52cdb4eb529 (patch) | |
tree | 9a20113c79a6e4efd9a492186c29f6b4868f748b | |
parent | 06bfeeb0b0861d4c5c28f00a5362ed45e7fe8580 (diff) | |
download | freebsd-ports-f6ec15f572fb2008784ed7457709a52cdb4eb529.tar.gz freebsd-ports-f6ec15f572fb2008784ed7457709a52cdb4eb529.tar.zst freebsd-ports-f6ec15f572fb2008784ed7457709a52cdb4eb529.zip |
Fix build with LibreSSL 2.7
Obtained from: https://github.com/openbsd/ports/blob/master/net/curl/patches/patch-lib_vtls_openssl_c
PR: 226845
Submitted by: Piotr Kubaj <pkubaj@anongoth.pl>
MFH: 2018Q1
Notes
Notes:
svn path=/head/; revision=465485
-rw-r--r-- | ftp/curl/files/patch-lib-vtls-openssl.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ftp/curl/files/patch-lib-vtls-openssl.c b/ftp/curl/files/patch-lib-vtls-openssl.c new file mode 100644 index 000000000000..e705e691d2b8 --- /dev/null +++ b/ftp/curl/files/patch-lib-vtls-openssl.c @@ -0,0 +1,28 @@ +--- lib/vtls/openssl.c.orig 2018-03-22 14:26:38 UTC ++++ lib/vtls/openssl.c +@@ -117,12 +117,7 @@ + #define X509_get0_notBefore(x) X509_get_notBefore(x) + #define X509_get0_notAfter(x) X509_get_notAfter(x) + #define CONST_EXTS /* nope */ +-#ifdef LIBRESSL_VERSION_NUMBER +-static unsigned long OpenSSL_version_num(void) +-{ +- return LIBRESSL_VERSION_NUMBER; +-} +-#else ++#ifndef LIBRESSL_VERSION_NUMBER + #define OpenSSL_version_num() SSLeay() + #endif + #endif +@@ -3526,7 +3521,11 @@ static size_t Curl_ossl_version(char *bu + unsigned long ssleay_value; + sub[2]='\0'; + sub[1]='\0'; ++#ifdef LIBRESSL_VERSION_NUMBER ++ ssleay_value = LIBRESSL_VERSION_NUMBER; ++#else + ssleay_value = OpenSSL_version_num(); ++#endif + if(ssleay_value < 0x906000) { + ssleay_value = SSLEAY_VERSION_NUMBER; + sub[0]='\0'; |