pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkgsrc: imap-uw: use Debian patch to fix build with openssl 1.1.
details: https://anonhg.NetBSD.org/pkgsrc/rev/e6e3cefa90fc
branches: trunk
changeset: 306348:e6e3cefa90fc
user: wiz <wiz%pkgsrc.org@localhost>
date: Sun Apr 15 07:43:22 2018 +0000
description:
imap-uw: use Debian patch to fix build with openssl 1.1.
Untested, except that it builds.
Bump PKGREVISION.
diffstat:
mail/imap-uw/Makefile | 4 +-
mail/imap-uw/distinfo | 3 +-
mail/imap-uw/patches/patch-src_osdep_unix_ssl__unix.c | 60 +++++++++++++++++++
3 files changed, 64 insertions(+), 3 deletions(-)
diffs (96 lines):
diff -r 9a2e6c26aea0 -r e6e3cefa90fc mail/imap-uw/Makefile
--- a/mail/imap-uw/Makefile Sun Apr 15 07:38:53 2018 +0000
+++ b/mail/imap-uw/Makefile Sun Apr 15 07:43:22 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.145 2018/02/16 22:06:58 jdolecek Exp $
+# $NetBSD: Makefile,v 1.146 2018/04/15 07:43:22 wiz Exp $
#
# ATTENTION:
# The Kerberos support in this software is known to be problematic. If you
@@ -11,7 +11,7 @@
DISTNAME= imap-2007f
PKGNAME= ${DISTNAME:S/-/-uw-/}
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= mail
MASTER_SITES= ftp://ftp.cac.washington.edu/imap/
EXTRACT_SUFX= .tar.Z
diff -r 9a2e6c26aea0 -r e6e3cefa90fc mail/imap-uw/distinfo
--- a/mail/imap-uw/distinfo Sun Apr 15 07:38:53 2018 +0000
+++ b/mail/imap-uw/distinfo Sun Apr 15 07:43:22 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.45 2017/06/02 05:35:21 taca Exp $
+$NetBSD: distinfo,v 1.46 2018/04/15 07:43:22 wiz Exp $
SHA1 (imap-2007f.tar.Z) = 1c9935e5a261baec85dadcbc0c514b66fa3ce0a5
RMD160 (imap-2007f.tar.Z) = 14f40284e9e164c0ed7677f1e5d8e3309c7c58c1
@@ -40,3 +40,4 @@
SHA1 (patch-src_c-client_misc.c) = d22ca95fb333b5234c66440faf5d6e30a148bad1
SHA1 (patch-src_c-client_misc.h) = 5cf51d186b04ebb45c79b8042bbdcb01716dd2ce
SHA1 (patch-src_mlock_Makefile) = 6bf652f597ad21dffa44e01d6cb89525eeaf7fc9
+SHA1 (patch-src_osdep_unix_ssl__unix.c) = c36d87ab1f10e4a07bd50db5f8222daefa441251
diff -r 9a2e6c26aea0 -r e6e3cefa90fc mail/imap-uw/patches/patch-src_osdep_unix_ssl__unix.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/imap-uw/patches/patch-src_osdep_unix_ssl__unix.c Sun Apr 15 07:43:22 2018 +0000
@@ -0,0 +1,60 @@
+$NetBSD: patch-src_osdep_unix_ssl__unix.c,v 1.1 2018/04/15 07:43:22 wiz Exp $
+
+Description: Support OpenSSL 1.1
+ When building with OpenSSL 1.1 and newer, use the new built-in
+ hostname verification instead of code that doesn't compile due to
+ structs having been made opaque.
+Bug-Debian: https://bugs.debian.org/828589
+
+--- src/osdep/unix/ssl_unix.c.orig 2011-07-23 00:20:10.000000000 +0000
++++ src/osdep/unix/ssl_unix.c
+@@ -227,8 +227,16 @@ static char *ssl_start_work (SSLSTREAM *
+ /* disable certificate validation? */
+ if (flags & NET_NOVALIDATECERT)
+ SSL_CTX_set_verify (stream->context,SSL_VERIFY_NONE,NIL);
+- else SSL_CTX_set_verify (stream->context,SSL_VERIFY_PEER,ssl_open_verify);
++ else {
++#if OPENSSL_VERSION_NUMBER >= 0x10100000
++ X509_VERIFY_PARAM *param = SSL_CTX_get0_param(stream->context);
++ X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
++ X509_VERIFY_PARAM_set1_host(param, host, 0);
++#endif
++
++ SSL_CTX_set_verify (stream->context,SSL_VERIFY_PEER,ssl_open_verify);
+ /* set default paths to CAs... */
++ }
+ SSL_CTX_set_default_verify_paths (stream->context);
+ /* ...unless a non-standard path desired */
+ if (s = (char *) mail_parameters (NIL,GET_SSLCAPATH,NIL))
+@@ -266,6 +274,7 @@ static char *ssl_start_work (SSLSTREAM *
+ if (SSL_write (stream->con,"",0) < 0)
+ return ssl_last_error ? ssl_last_error : "SSL negotiation failed";
+ /* need to validate host names? */
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ if (!(flags & NET_NOVALIDATECERT) &&
+ (err = ssl_validate_cert (cert = SSL_get_peer_certificate (stream->con),
+ host))) {
+@@ -275,6 +284,7 @@ static char *ssl_start_work (SSLSTREAM *
+ sprintf (tmp,"*%.128s: %.255s",err,cert ? cert->name : "???");
+ return ssl_last_error = cpystr (tmp);
+ }
++#endif
+ return NIL;
+ }
+
+@@ -313,6 +323,7 @@ static int ssl_open_verify (int ok,X509_
+ * Returns: NIL if validated, else string of error message
+ */
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ static char *ssl_validate_cert (X509 *cert,char *host)
+ {
+ int i,n;
+@@ -342,6 +353,7 @@ static char *ssl_validate_cert (X509 *ce
+ else ret = "Unable to locate common name in certificate";
+ return ret;
+ }
++#endif
+
+ /* Case-independent wildcard pattern match
+ * Accepts: base string
Home |
Main Index |
Thread Index |
Old Index