diff options
author | christos <christos@pkgsrc.org> | 2018-04-16 21:27:56 +0000 |
---|---|---|
committer | christos <christos@pkgsrc.org> | 2018-04-16 21:27:56 +0000 |
commit | 22896867f1d9f6863da93c3888a269f21432fb4f (patch) | |
tree | 9e412e71b91c876e3205c41c45d7d3e4342e7b5f /mail/imap-uw | |
parent | 9abe4bdfe92ba1d2e4c5b03a1b5db23ee219ac92 (diff) | |
download | pkgsrc-22896867f1d9f6863da93c3888a269f21432fb4f.tar.gz |
fix deprecated methods.
Diffstat (limited to 'mail/imap-uw')
-rw-r--r-- | mail/imap-uw/Makefile | 4 | ||||
-rw-r--r-- | mail/imap-uw/distinfo | 7 | ||||
-rw-r--r-- | mail/imap-uw/patches/patch-src_osdep_unix_ssl__unix.c | 93 |
3 files changed, 93 insertions, 11 deletions
diff --git a/mail/imap-uw/Makefile b/mail/imap-uw/Makefile index b45a8d4c193..984bf04879e 100644 --- a/mail/imap-uw/Makefile +++ b/mail/imap-uw/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.146 2018/04/15 07:43:22 wiz Exp $ +# $NetBSD: Makefile,v 1.147 2018/04/16 21:27:56 christos 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= 6 +PKGREVISION= 7 CATEGORIES= mail MASTER_SITES= ftp://ftp.cac.washington.edu/imap/ EXTRACT_SUFX= .tar.Z diff --git a/mail/imap-uw/distinfo b/mail/imap-uw/distinfo index ee794742da8..f3d1e58960d 100644 --- a/mail/imap-uw/distinfo +++ b/mail/imap-uw/distinfo @@ -1,9 +1,12 @@ -$NetBSD: distinfo,v 1.46 2018/04/15 07:43:22 wiz Exp $ +$NetBSD: distinfo,v 1.47 2018/04/16 21:27:56 christos Exp $ SHA1 (imap-2007f.tar.Z) = 1c9935e5a261baec85dadcbc0c514b66fa3ce0a5 RMD160 (imap-2007f.tar.Z) = 14f40284e9e164c0ed7677f1e5d8e3309c7c58c1 SHA512 (imap-2007f.tar.Z) = 2c728deaf66d23158c61ae55ff94f05d2a1cf0168002760321ca30c6ee1c58c0a4c7bc14ece0097ea662df6c7c49be3b91c8e5e943724c9e2736800fa9298dae Size (imap-2007f.tar.Z) = 2793529 bytes +<<<<<<< distinfo +======= +>>>>>>> 1.46 SHA1 (patch-aa) = ac880c250dfee3d0d316063ace5b92cd2f190510 SHA1 (patch-ab) = c7985a2db4d4b5c8d2644492b2e48f8ebe2d64b1 SHA1 (patch-ac) = eab1435fdf7ab59ea8afbde949a92dd756e6aea3 @@ -40,4 +43,4 @@ SHA1 (patch-src_c-client_mail.c) = fca90d3a5a8770b8728bdef6aec2623d16c12b6d 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 +SHA1 (patch-src_osdep_unix_ssl__unix.c) = cdb4ce9420f649d7cbd6d1e433336c6be94b10f9 diff --git a/mail/imap-uw/patches/patch-src_osdep_unix_ssl__unix.c b/mail/imap-uw/patches/patch-src_osdep_unix_ssl__unix.c index 988b819a56e..8dbadac95f0 100644 --- a/mail/imap-uw/patches/patch-src_osdep_unix_ssl__unix.c +++ b/mail/imap-uw/patches/patch-src_osdep_unix_ssl__unix.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_osdep_unix_ssl__unix.c,v 1.1 2018/04/15 07:43:22 wiz Exp $ +$NetBSD: patch-src_osdep_unix_ssl__unix.c,v 1.2 2018/04/16 21:27:57 christos Exp $ Description: Support OpenSSL 1.1 When building with OpenSSL 1.1 and newer, use the new built-in @@ -7,8 +7,23 @@ Description: Support OpenSSL 1.1 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 * ++++ src/osdep/unix/ssl_unix.c 2018-04-16 17:20:28.991950059 -0400 +@@ -219,16 +219,28 @@ + (sslclientkey_t) mail_parameters (NIL,GET_SSLCLIENTKEY,NIL); + if (ssl_last_error) fs_give ((void **) &ssl_last_error); + ssl_last_host = host; +- if (!(stream->context = SSL_CTX_new ((flags & NET_TLSCLIENT) ? +- TLSv1_client_method () : +- SSLv23_client_method ()))) ++ if (!(stream->context = SSL_CTX_new ( ++#if OPENSSL_VERSION_NUMBER < 0x10100000UL ++ (flags & NET_TLSCLIENT) ? TLSv1_client_method () : SSLv23_client_method () ++#else ++ TLS_client_method() ++#endif ++ ))) + return "SSL context failed"; + SSL_CTX_set_options (stream->context,0); /* disable certificate validation? */ if (flags & NET_NOVALIDATECERT) SSL_CTX_set_verify (stream->context,SSL_VERIFY_NONE,NIL); @@ -26,7 +41,7 @@ Bug-Debian: https://bugs.debian.org/828589 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 * +@@ -266,6 +278,7 @@ if (SSL_write (stream->con,"",0) < 0) return ssl_last_error ? ssl_last_error : "SSL negotiation failed"; /* need to validate host names? */ @@ -34,7 +49,7 @@ Bug-Debian: https://bugs.debian.org/828589 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 * +@@ -275,6 +288,7 @@ sprintf (tmp,"*%.128s: %.255s",err,cert ? cert->name : "???"); return ssl_last_error = cpystr (tmp); } @@ -42,7 +57,7 @@ Bug-Debian: https://bugs.debian.org/828589 return NIL; } -@@ -313,6 +323,7 @@ static int ssl_open_verify (int ok,X509_ +@@ -313,6 +327,7 @@ * Returns: NIL if validated, else string of error message */ @@ -50,7 +65,7 @@ Bug-Debian: https://bugs.debian.org/828589 static char *ssl_validate_cert (X509 *cert,char *host) { int i,n; -@@ -342,6 +353,7 @@ static char *ssl_validate_cert (X509 *ce +@@ -342,6 +357,7 @@ else ret = "Unable to locate common name in certificate"; return ret; } @@ -58,3 +73,67 @@ Bug-Debian: https://bugs.debian.org/828589 /* Case-independent wildcard pattern match * Accepts: base string +@@ -702,9 +718,13 @@ + if (stat (key,&sbuf)) strcpy (key,cert); + } + /* create context */ +- if (!(stream->context = SSL_CTX_new (start_tls ? +- TLSv1_server_method () : +- SSLv23_server_method ()))) ++ if (!(stream->context = SSL_CTX_new ( ++#if OPENSSL_VERSION_NUMBER < 0x10100000UL ++ start_tls ? TLSv1_server_method () : SSLv23_server_method () ++#else ++ TLS_server_method () ++#endif ++ ))) + syslog (LOG_ALERT,"Unable to create SSL context, host=%.80s", + tcp_clienthost ()); + else { /* set context options */ +@@ -772,17 +792,35 @@ + { + unsigned long i; + static RSA *key = NIL; +- if (!key) { /* if don't have a key already */ +- /* generate key */ +- if (!(key = RSA_generate_key (export ? keylength : 1024,RSA_F4,NIL,NIL))) { +- syslog (LOG_ALERT,"Unable to generate temp key, host=%.80s", +- tcp_clienthost ()); +- while (i = ERR_get_error ()) +- syslog (LOG_ALERT,"SSL error status: %s",ERR_error_string (i,NIL)); +- exit (1); +- } +- } +- return key; ++ static BIGNUM *ebn = NIL; ++ ++ if (key) ++ return key; ++ ++ key = RSA_new (); ++ if (!key) /* if don't have a key already */ ++ goto out; ++ ++ ebn = BN_new (); ++ if (!ebn) ++ goto out; ++ BN_set_word (ebn, RSA_F4); ++ ++ if (!RSA_generate_key_ex (key, export ? keylength : 1024, ebn, NIL)) ++ goto out; ++ BN_free (ebn); ++ return key; ++ ++out: ++ if (key) ++ RSA_free (key); ++ if (ebn) ++ BN_free (ebn); ++ syslog (LOG_ALERT,"Unable to generate temp key, host=%.80s", ++ tcp_clienthost ()); ++ while (i = ERR_get_error ()) ++ syslog (LOG_ALERT,"SSL error status: %s",ERR_error_string (i,NIL)); ++ exit (1); + } + + /* Wait for stdin input |