diff options
author | Vlad Glagolev | 2021-05-11 00:09:32 +0000 |
---|---|---|
committer | Vlad Glagolev | 2021-05-11 00:09:32 +0000 |
commit | 1936bf6f75bfa9ac87ea6c8a537c0beedd4b2191 (patch) | |
tree | cab107701713b6ed67917f7e724e09e414eed059 /mail | |
parent | ff00cc46ad1aa84bd86954b4e3a44c6e2c45da03 (diff) |
mailx: updated libressl patch
Diffstat (limited to 'mail')
-rw-r--r-- | mail/mailx/HISTORY | 3 | ||||
-rw-r--r-- | mail/mailx/libressl.patch | 59 |
2 files changed, 48 insertions, 14 deletions
diff --git a/mail/mailx/HISTORY b/mail/mailx/HISTORY index 2798562982..414072a742 100644 --- a/mail/mailx/HISTORY +++ b/mail/mailx/HISTORY @@ -1,3 +1,6 @@ +2021-05-10 Vlad Glagolev <stealth@sourcemage.org> + * libressl.patch: updated patch for newer libressl + 2015-05-25 Thomas Orgis <sobukus@sourcemage.org> * DETAILS: remove SOURCEFORGE_URL usage (automated) diff --git a/mail/mailx/libressl.patch b/mail/mailx/libressl.patch index 8cca072cf8..cea9377adc 100644 --- a/mail/mailx/libressl.patch +++ b/mail/mailx/libressl.patch @@ -1,22 +1,53 @@ +From: Adam Duskett <aduskett@gmail.com> +Date: Fri, 4 Aug 2017 07:22:47 -0400 +Subject: [PATCH] fix libressl support + +heirloom-mailx has two small issues when compiling against LibreSSL: + - RAND_egd is used (LibreSSL does not support RAND_egd) + Solution: "Guard" the code calling RAND_egd + + - SSLv3_client_method function is used (LibreSSL does not support SSLv3) + Solution: "Guard" the code with #ifndef OPENSSL_NO_SSL3 + +Signed-off-by: Adam Duskett <aduskett@gmail.com> +--- + openssl.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/openssl.c b/openssl.c +index 44fe4e5..c4a1bb7 100644 --- openssl.c.orig +++ openssl.c -@@ -56,6 +56,7 @@ - static struct termios otio; - static sigjmp_buf ssljmp; - -+#include <stdint.h> - #include <openssl/crypto.h> - #include <openssl/ssl.h> - #include <openssl/err.h> -@@ -137,11 +138,6 @@ +@@ -137,11 +137,13 @@ ssl_rand_init(void) if ((cp = value("ssl-rand-egd")) != NULL) { cp = expand(cp); -- if (RAND_egd(cp) == -1) { -- fprintf(stderr, catgets(catd, CATSET, 245, -- "entropy daemon at \"%s\" not available\n"), -- cp); -- } else ++#ifndef OPENSSL_NO_EGD + if (RAND_egd(cp) == -1) { + fprintf(stderr, catgets(catd, CATSET, 245, + "entropy daemon at \"%s\" not available\n"), + cp); + } else ++#endif state = 1; } else if ((cp = value("ssl-rand-file")) != NULL) { cp = expand(cp); +@@ -216,10 +218,15 @@ ssl_select_method(const char *uhp) + + cp = ssl_method_string(uhp); + if (cp != NULL) { ++ #ifndef OPENSSL_NO_SSL3 + if (equal(cp, "ssl3")) + method = SSLv3_client_method(); + else if (equal(cp, "tls1")) + method = TLSv1_client_method(); ++ #else ++ if (equal(cp, "tls1")) ++ method = TLSv1_client_method(); ++ #endif + else { + fprintf(stderr, catgets(catd, CATSET, 244, + "Invalid SSL method \"%s\"\n"), cp); +-- +2.13.3 + |