blob: 465b5cc17c9ead883ceaf85ade4b6350dc504547 (
plain)
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
|
From 88349e6cc2f31273db94821d1c3a960ee3362215 Mon Sep 17 00:00:00 2001
From: Anna V <cyber@sysrq.in>
Date: Tue, 9 Apr 2024 03:47:33 +0500
Subject: [PATCH] Fix build failure with LibreSSL
The library can't be compiled with LibreSSL
since 1dc4ac9a0ca4a7e0ef026194a1ce56b45db6fe8d
RFC 7627 APIs were introduced in OpenSSL 1.1.0. This quick fix replaces
SSL_get_extms_support with a macro in versions that don't have it.
---
I license this contribution under the terms set out in the Unlicense
license.
---
c_src/fast_tls.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/c_src/fast_tls.c b/c_src/fast_tls.c
index b0116b2..0599e8c 100644
--- a/c_src/fast_tls.c
+++ b/c_src/fast_tls.c
@@ -72,6 +72,10 @@ typedef unsigned __int32 uint32_t;
#define DH_set0_pqg(dh, dh_p, param, dh_g) (dh)->p = dh_p; (dh)->g = dh_g
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#define SSL_get_extms_support(s) 0
+#endif
+
#if OPENSSL_VERSION_NUMBER < 0x10002000L
#define SSL_is_server(s) (s)->server
#endif
|