aboutsummaryrefslogtreecommitdiffstats
path: root/mail/postfix
diff options
context:
space:
mode:
authorbrnrd <brnrd@FreeBSD.org>2017-05-21 02:34:55 +0800
committerbrnrd <brnrd@FreeBSD.org>2017-05-21 02:34:55 +0800
commit8e4ea9bd95e8c7c6fdf85683e6e1e18c84e3458d (patch)
tree8e9346b0049717117bd773480b9a17870b871d00 /mail/postfix
parent3240ec6486bf9dc1a24c59f516a0e0a8ea05f17d (diff)
downloadfreebsd-ports-gnome-8e4ea9bd95e8c7c6fdf85683e6e1e18c84e3458d.tar.gz
freebsd-ports-gnome-8e4ea9bd95e8c7c6fdf85683e6e1e18c84e3458d.tar.zst
freebsd-ports-gnome-8e4ea9bd95e8c7c6fdf85683e6e1e18c84e3458d.zip
mail/postfix: Fix x25519 kex with LibreSSL
PR: 216790 Obtained from: OpenBSD ports Approved by: ohauer (maintainer)
Diffstat (limited to 'mail/postfix')
-rw-r--r--mail/postfix/files/patch-src_tls_tls.h19
-rw-r--r--mail/postfix/files/patch-src_tls_tls__dh.c15
2 files changed, 30 insertions, 4 deletions
diff --git a/mail/postfix/files/patch-src_tls_tls.h b/mail/postfix/files/patch-src_tls_tls.h
index 2bf7bdd5d082..56bbb585f6e3 100644
--- a/mail/postfix/files/patch-src_tls_tls.h
+++ b/mail/postfix/files/patch-src_tls_tls.h
@@ -1,7 +1,8 @@
-# fix build against LibreSSL
-# Obtained from: http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/mail/postfix/stable/patches/
-#
---- src/tls/tls.h.orig 2016-02-06 20:09:41 UTC
+$OpenBSD: patch-src_tls_tls_h,v 1.2 2017/03/04 22:09:43 sthen Exp $
+
+Fix building with LibreSSL
+
+--- src/tls/tls.h.orig 2017-01-01 22:22:13 UTC
+++ src/tls/tls.h
@@ -89,7 +89,7 @@ extern const char *str_tls_level(int);
#endif
@@ -12,3 +13,13 @@
#define OpenSSL_version_num SSLeay
#define OpenSSL_version SSLeay_version
#define OPENSSL_VERSION SSLEAY_VERSION
+@@ -104,6 +104,9 @@ extern const char *str_tls_level(int);
+ #define ASN1_STRING_get0_data ASN1_STRING_data
+ #define X509_getm_notBefore X509_get_notBefore
+ #define X509_getm_notAfter X509_get_notAfter
++#endif
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ #define TLS_method SSLv23_method
+ #define TLS_client_method SSLv23_client_method
+ #define TLS_server_method SSLv23_server_method
diff --git a/mail/postfix/files/patch-src_tls_tls__dh.c b/mail/postfix/files/patch-src_tls_tls__dh.c
new file mode 100644
index 000000000000..686798d405eb
--- /dev/null
+++ b/mail/postfix/files/patch-src_tls_tls__dh.c
@@ -0,0 +1,15 @@
+$OpenBSD: patch-src_tls_tls_dh_c,v 1.1 2017/03/04 22:09:43 sthen Exp $
+
+Fix building with LibreSSL
+
+--- src/tls/tls_dh.c.orig 2016-12-26 23:47:24 UTC
++++ src/tls/tls_dh.c
+@@ -314,7 +314,7 @@ void tls_auto_eecdh_curves(SSL_CTX *c
+ * This is a NOP in OpenSSL 1.1.0 and later, where curves are always
+ * auto-negotiated.
+ */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000UL
++#if OPENSSL_VERSION_NUMBER < 0x10100000UL || defined(LIBRESSL_VERSION_NUMBER)
+ if (SSL_CTX_set_ecdh_auto(ctx, 1) <= 0) {
+ msg_warn("failed to enable automatic ECDHE curve selection");
+ tls_print_errors();