diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2018-12-14 16:55:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-14 16:55:48 +0200 |
commit | 6ee42b8eac8f766b8714f3bfb9e45a713a8f4d9f (patch) | |
tree | 1f24e741b90e7b881f07a5f62f62924f3e137a11 /mail | |
parent | 8f78a82cfddb1bfdb3f5803a3064103bbeff12b0 (diff) | |
parent | fbbfabd3c170fc746aaf4358f4b8fc20aa63dd43 (diff) |
Merge pull request #7564 from neheb/nail
nail: Fix compilation without deprecated OpenSSL APIs
Diffstat (limited to 'mail')
-rw-r--r-- | mail/nail/Makefile | 2 | ||||
-rw-r--r-- | mail/nail/patches/300-openssl-deprecated.patch | 47 |
2 files changed, 48 insertions, 1 deletions
diff --git a/mail/nail/Makefile b/mail/nail/Makefile index 2990084d2..9fefd3f9d 100644 --- a/mail/nail/Makefile +++ b/mail/nail/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nail PKG_VERSION:=12.5 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_LICENSE:=BSD-2-Clause PKG_SOURCE:=heirloom-mailx_$(PKG_VERSION).orig.tar.gz diff --git a/mail/nail/patches/300-openssl-deprecated.patch b/mail/nail/patches/300-openssl-deprecated.patch new file mode 100644 index 000000000..8ba69adab --- /dev/null +++ b/mail/nail/patches/300-openssl-deprecated.patch @@ -0,0 +1,47 @@ +--- a/openssl.c ++++ b/openssl.c +@@ -174,7 +174,9 @@ ssl_init(void) + { + verbose = value("verbose") != NULL; + if (initialized == 0) { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init(); ++#endif + initialized = 1; + } + if (rand_init == 0) +@@ -215,12 +217,13 @@ ssl_verify_cb(int success, X509_STORE_CTX *store) + static const SSL_METHOD * + ssl_select_method(const char *uhp) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + const SSL_METHOD *method; + char *cp; + + cp = ssl_method_string(uhp); + if (cp != NULL) { +-#if !defined(OPENSSL_NO_SSL2) && !OPENSSL_VERSION_NUMBER >= 0x10100000L ++#ifndef OPENSSL_NO_SSL2 + if (equal(cp, "ssl2")) + method = SSLv2_client_method(); + else +@@ -240,6 +243,9 @@ ssl_select_method(const char *uhp) + } else + method = SSLv23_client_method(); + return method; ++#else ++ return TLS_client_method(); ++#endif + } + + static void +@@ -427,7 +433,9 @@ ssl_gen_err(const char *fmt, ...) + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_load_error_strings(); ++#endif + fprintf(stderr, ": %s\n", + (ERR_error_string(ERR_get_error(), NULL))); + } |