From de9fda6698e6f29165beee6acb47da2696aadfbc Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 2 Dec 2018 16:42:38 -0800 Subject: [PATCH] mutt: Update to 1.11.1 Added patch to fix compilation without deprecated OpenSSL APIs. Signed-off-by: Rosen Penev --- mail/mutt/Makefile | 8 +- .../mutt/patches/010-openssl-deprecated.patch | 80 +++++++++++++++++++ 2 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 mail/mutt/patches/010-openssl-deprecated.patch diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile index ecfbd8915..ff9abf61d 100644 --- a/mail/mutt/Makefile +++ b/mail/mutt/Makefile @@ -8,21 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mutt -PKG_VERSION:=1.10.1 +PKG_VERSION:=1.11.1 PKG_RELEASE:=1 PKG_SOURCE_URL:=ftp://ftp.mutt.org/pub/mutt/ \ https://bitbucket.org/mutt/mutt/downloads/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=734a3883158ec3d180cf6538d8bd7f685ce641d2cdef657aa0038f76e79a54a0 +PKG_HASH:=705141013662e53b78e49ed545360281f30a09ddda908f4de733277a60b1db05 +PKG_MAINTAINER:=Phil Eichinger PKG_LICENSE:=GPL-2.0+ PKG_LICENSE_FILES:=GPL -PKG_MAINTAINER:=Phil Eichinger PKG_FIXUP:=autoreconf - PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/mail/mutt/patches/010-openssl-deprecated.patch b/mail/mutt/patches/010-openssl-deprecated.patch new file mode 100644 index 000000000..7854afcf9 --- /dev/null +++ b/mail/mutt/patches/010-openssl-deprecated.patch @@ -0,0 +1,80 @@ +--- a/mutt_ssl.c ++++ b/mutt_ssl.c +@@ -28,6 +28,14 @@ + #include + #include + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define X509_get0_notBefore X509_get_notBefore ++#define X509_get0_notAfter X509_get_notAfter ++#define X509_getm_notBefore X509_get_notBefore ++#define X509_getm_notAfter X509_get_notAfter ++#define X509_STORE_CTX_get0_chain X509_STORE_CTX_get_chain ++#endif ++ + #undef _ + + #include +@@ -121,8 +129,8 @@ static int ssl_load_certificates (SSL_CTX *ctx) + + while (NULL != PEM_read_X509 (fp, &cert, NULL, NULL)) + { +- if ((X509_cmp_current_time (X509_get_notBefore (cert)) >= 0) || +- (X509_cmp_current_time (X509_get_notAfter (cert)) <= 0)) ++ if ((X509_cmp_current_time (X509_get0_notBefore (cert)) >= 0) || ++ (X509_cmp_current_time (X509_get0_notAfter (cert)) <= 0)) + { + dprint (2, (debugfile, "ssl_load_certificates: filtering expired cert: %s\n", + X509_NAME_oneline (X509_get_subject_name (cert), buf, sizeof (buf)))); +@@ -331,10 +339,12 @@ static int ssl_init (void) + } + } + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + /* I don't think you can do this just before reading the error. The call + * itself might clobber the last SSL error. */ + SSL_load_error_strings(); + SSL_library_init(); ++#endif + init_complete = 1; + return 0; + } +@@ -811,7 +821,7 @@ static int check_certificate_expiration (X509 *peercert, int silent) + { + if (option (OPTSSLVERIFYDATES) != MUTT_NO) + { +- if (X509_cmp_current_time (X509_get_notBefore (peercert)) >= 0) ++ if (X509_cmp_current_time (X509_get0_notBefore (peercert)) >= 0) + { + if (!silent) + { +@@ -821,7 +831,7 @@ static int check_certificate_expiration (X509 *peercert, int silent) + } + return 0; + } +- if (X509_cmp_current_time (X509_get_notAfter (peercert)) <= 0) ++ if (X509_cmp_current_time (X509_get0_notAfter (peercert)) <= 0) + { + if (!silent) + { +@@ -1069,7 +1079,7 @@ static int ssl_verify_callback (int preverify_ok, X509_STORE_CTX *ctx) + + cert = X509_STORE_CTX_get_current_cert (ctx); + pos = X509_STORE_CTX_get_error_depth (ctx); +- len = sk_X509_num (X509_STORE_CTX_get_chain (ctx)); ++ len = sk_X509_num (X509_STORE_CTX_get0_chain (ctx)); + + dprint (1, (debugfile, + "ssl_verify_callback: checking cert chain entry %s (preverify: %d skipmode: %d)\n", +@@ -1198,9 +1208,9 @@ static int interactive_check_cert (X509 *cert, int idx, int len, SSL *ssl, int a + row++; + snprintf (menu->dialog[row++], SHORT_STRING, "%s", _("This certificate is valid")); + snprintf (menu->dialog[row++], SHORT_STRING, _(" from %s"), +- asn1time_to_string (X509_get_notBefore (cert))); ++ asn1time_to_string (X509_getm_notBefore (cert))); + snprintf (menu->dialog[row++], SHORT_STRING, _(" to %s"), +- asn1time_to_string (X509_get_notAfter (cert))); ++ asn1time_to_string (X509_getm_notAfter (cert))); + + row++; + buf[0] = '\0';