View | Details | Raw Unified | Return to bug 216790 | Differences between
and this patch

Collapse All | Expand All

(-)mail/postfix-current/files/patch-src_tls_tls.h (-4 / +15 lines)
Lines 1-7 Link Here
1
# fix build against LibreSSL
1
$OpenBSD: patch-src_tls_tls_h,v 1.2 2017/03/04 22:09:43 sthen Exp $
2
# Obtained from: http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/mail/postfix/stable/patches/
2
3
# 
3
Fix building with LibreSSL
4
--- src/tls/tls.h.orig	2016-02-06 20:09:41 UTC
4
5
--- src/tls/tls.h.orig	2017-01-01 22:22:13 UTC
5
+++ src/tls/tls.h
6
+++ src/tls/tls.h
6
@@ -89,7 +89,7 @@ extern const char *str_tls_level(int);
7
@@ -89,7 +89,7 @@ extern const char *str_tls_level(int);
7
 #endif
8
 #endif
Lines 12-14 Link Here
12
 #define OpenSSL_version_num SSLeay
13
 #define OpenSSL_version_num SSLeay
13
 #define OpenSSL_version SSLeay_version
14
 #define OpenSSL_version SSLeay_version
14
 #define OPENSSL_VERSION SSLEAY_VERSION
15
 #define OPENSSL_VERSION SSLEAY_VERSION
16
@@ -104,6 +104,9 @@ extern const char *str_tls_level(int);
17
 #define ASN1_STRING_get0_data ASN1_STRING_data
18
 #define X509_getm_notBefore X509_get_notBefore
19
 #define X509_getm_notAfter X509_get_notAfter
20
+#endif
21
+
22
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
23
 #define TLS_method SSLv23_method
24
 #define TLS_client_method SSLv23_client_method
25
 #define TLS_server_method SSLv23_server_method
(-)mail/postfix-current/files/patch-src_tls_tls__dh.c (-46 / +13 lines)
Lines 1-48 Link Here
1
PR 216732: Fix build with libressl < 2.5.1
1
$OpenBSD: patch-src_tls_tls_dh_c,v 1.1 2017/03/04 22:09:43 sthen Exp $
2
=========================================================
2
3
Fix building with LibreSSL
4
3
--- src/tls/tls_dh.c.orig	2016-12-26 23:47:24 UTC
5
--- src/tls/tls_dh.c.orig	2016-12-26 23:47:24 UTC
4
+++ src/tls/tls_dh.c
6
+++ src/tls/tls_dh.c
5
@@ -94,7 +94,7 @@
7
@@ -314,7 +314,7 @@ void    tls_auto_eecdh_curves(SSL_CTX *c
6
 #define TLS_INTERNAL
8
      * This is a NOP in OpenSSL 1.1.0 and later, where curves are always
7
 #include <tls.h>
9
      * auto-negotiated.
8
 #include <openssl/dh.h>
10
      */
9
-#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(OPENSSL_NO_ECDH)
11
-#if OPENSSL_VERSION_NUMBER < 0x10100000UL
10
+#if OPENSSL_VERSION_NUMBER >= 0x1000200fUL && !defined(OPENSSL_NO_ECDH) && !defined(LIBRESSL_VERSION_NUMBER)
12
+#if OPENSSL_VERSION_NUMBER < 0x10100000UL || defined(LIBRESSL_VERSION_NUMBER)
11
 #include <openssl/ec.h>
13
     if (SSL_CTX_set_ecdh_auto(ctx, 1) <= 0) {
12
 #endif
14
 	msg_warn("failed to enable automatic ECDHE curve selection");
13
 
15
 	tls_print_errors();
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;

Return to bug 216790