Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Apr 2018 08:25:24 +0000 (UTC)
From:      Bernard Spil <brnrd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r467918 - head/www/h2o/files
Message-ID:  <201804220825.w3M8PO6E010807@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brnrd
Date: Sun Apr 22 08:25:23 2018
New Revision: 467918
URL: https://svnweb.freebsd.org/changeset/ports/467918

Log:
  www/h2o: Fix build with LibreSSL 2.7
  
   - LibreSSL 2.7 implements OpenSSL 1.1 API
   - Use patch from upstream issue 1706
  
  PR:		227169
  Approved by:	maintainer time-out

Added:
  head/www/h2o/files/patch-issue1706   (contents, props changed)

Added: head/www/h2o/files/patch-issue1706
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/h2o/files/patch-issue1706	Sun Apr 22 08:25:23 2018	(r467918)
@@ -0,0 +1,55 @@
+https://github.com/h2o/h2o/issues/1706
+
+--- include/h2o/openssl_backport.h.orig	2017-12-15 03:08:00 UTC
++++ include/h2o/openssl_backport.h
+@@ -25,7 +25,7 @@
+ #include <stdlib.h>
+ 
+ /* backports for OpenSSL 1.0.2 */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ 
+ #define BIO_get_data(bio) ((bio)->ptr)
+ #define BIO_set_data(bio, p) ((bio)->ptr = (p))
+@@ -57,7 +57,7 @@ static inline BIO_METHOD *BIO_meth_new(i
+ #endif
+ 
+ /* backports for OpenSSL 1.0.1 and LibreSSL */
+-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10002000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ 
+ #define SSL_is_server(ssl) ((ssl)->server)
+ 
+--- deps/neverbleed/neverbleed.c.orig	2017-12-15 03:08:00 UTC
++++ deps/neverbleed/neverbleed.c
+@@ -547,7 +547,7 @@ static int sign_stub(struct expbuf_t *bu
+     return 0;
+ }
+ 
+-#if !OPENSSL_1_1_API
++#if !OPENSSL_1_1_API && (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ 
+ static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
+ {
+--- deps/picotls/lib/openssl.c.orig	2017-12-15 03:08:00 UTC
++++ deps/picotls/lib/openssl.c
+@@ -35,13 +35,16 @@
+ #include "picotls.h"
+ #include "picotls/openssl.h"
+ 
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
+-#define OPENSSL_1_0_API 1
++#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
++#define OPENSSL_1_1_API 1
++#elif defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL
++#define OPENSSL_1_1_API 1
+ #else
+ #define OPENSSL_1_0_API 0
++#define OPENSSL_1_1_API 0
+ #endif
+ 
+-#if OPENSSL_1_0_API
++#if !OPENSSL_1_1_API
+ 
+ #define EVP_PKEY_up_ref(p) CRYPTO_add(&(p)->references, 1, CRYPTO_LOCK_EVP_PKEY)
+ #define X509_STORE_up_ref(p) CRYPTO_add(&(p)->references, 1, CRYPTO_LOCK_X509_STORE)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804220825.w3M8PO6E010807>