Lines 1-48
Link Here
|
1 |
PR 216732: Fix build with libressl < 2.5.1 |
|
|
2 |
========================================================= |
3 |
--- src/tls/tls_dh.c.orig 2016-12-26 23:47:24 UTC |
4 |
+++ src/tls/tls_dh.c |
5 |
@@ -94,7 +94,7 @@ |
6 |
#define TLS_INTERNAL |
7 |
#include <tls.h> |
8 |
#include <openssl/dh.h> |
9 |
-#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(OPENSSL_NO_ECDH) |
10 |
+#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(OPENSSL_NO_ECDH) && !defined(LIBRESSL_VERSION_NUMBER) |
11 |
#include <openssl/ec.h> |
12 |
#endif |
13 |
|
14 |
@@ -244,7 +244,7 @@ DH *tls_tmp_dh_cb(SSL *unused_ssl, i |
15 |
|
16 |
void tls_auto_eecdh_curves(SSL_CTX *ctx) |
17 |
{ |
18 |
-#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(OPENSSL_NO_ECDH) |
19 |
+#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(OPENSSL_NO_ECDH) && !defined(LIBRESSL_VERSION_NUMBER) |
20 |
SSL_CTX *tmpctx; |
21 |
int *nids; |
22 |
int space = 5; |
23 |
@@ -337,14 +337,14 @@ void tls_set_eecdh_curve(SSL_CTX *ser |
24 |
#define TLS_EECDH_NONE 1 |
25 |
#define TLS_EECDH_STRONG 2 |
26 |
#define TLS_EECDH_ULTRA 3 |
27 |
-#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL |
28 |
+#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(LIBRESSL_VERSION_NUMBER) |
29 |
#define TLS_EECDH_AUTO 4 |
30 |
#endif |
31 |
static NAME_CODE eecdh_table[] = { |
32 |
"none", TLS_EECDH_NONE, |
33 |
"strong", TLS_EECDH_STRONG, |
34 |
"ultra", TLS_EECDH_ULTRA, |
35 |
-#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL |
36 |
+#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(LIBRESSL_VERSION_NUMBER) |
37 |
"auto", TLS_EECDH_AUTO, |
38 |
#endif |
39 |
0, TLS_EECDH_INVALID, |
40 |
@@ -364,7 +364,7 @@ void tls_set_eecdh_curve(SSL_CTX *ser |
41 |
case TLS_EECDH_ULTRA: |
42 |
curve = var_tls_eecdh_ultra; |
43 |
break; |
44 |
-#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL |
45 |
+#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(LIBRESSL_VERSION_NUMBER) |
46 |
case TLS_EECDH_AUTO: |
47 |
tls_auto_eecdh_curves(server_ctx); |
48 |
return; |