1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
From 85b7f561f3bb546b13718f495a354a6b9ecd5d03 Mon Sep 17 00:00:00 2001
From: AIZAWA Hina <hina@bouhime.com>
Date: Fri, 23 Mar 2018 23:30:20 +0900
Subject: [PATCH] Add supporting LibreSSL 2.7
Signed-off-by: AIZAWA Hina <hina@bouhime.com>
---
include/h2o/openssl_backport.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/h2o/openssl_backport.h b/include/h2o/openssl_backport.h
index b24440e80..72cc43c45 100644
--- a/include/h2o/openssl_backport.h
+++ b/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(int type, const char *name)
#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)
diff --git a/deps/neverbleed/neverbleed.c b/deps/neverbleed/neverbleed.c
index 29b35a9..2caea00 100644
--- a/deps/neverbleed/neverbleed.c
+++ b/deps/neverbleed/neverbleed.c
@@ -547,7 +547,7 @@ static int sign_stub(struct expbuf_t *buf)
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)
{
diff --git a/deps/picotls/lib/openssl.c b/deps/picotls/lib/openssl.c
index 70ec0d0..50db1cf 100644
--- a/deps/picotls/lib/openssl.c
+++ b/deps/picotls/lib/openssl.c
@@ -35,7 +35,7 @@
#include "picotls.h"
#include "picotls/openssl.h"
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
#define OPENSSL_1_0_API 1
#else
#define OPENSSL_1_0_API 0
|