Handle missing SSLv3 support

- resolves: #1952949
This commit is contained in:
Nikola Forró 2021-05-21 20:03:42 +02:00
parent 2518efa399
commit eff3ee6245
2 changed files with 31 additions and 1 deletions

23
mailx-12.5-no-SSLv3.patch Normal file
View File

@ -0,0 +1,23 @@
diff --git a/openssl.c b/openssl.c
index 9d1eaf4..b5db2a8 100644
--- a/openssl.c
+++ b/openssl.c
@@ -229,9 +229,16 @@ ssl_select_method(const char *uhp)
"Unsupported SSL method \"%s\"\n"), cp);
method = SSLv23_client_method();
#endif
- } else if (equal(cp, "ssl3"))
+ } else if (equal(cp, "ssl3")) {
+#ifndef OPENSSL_NO_SSL3_METHOD
method = SSLv3_client_method();
- else if (equal(cp, "tls1"))
+#else
+ /* no SSLv3 support */
+ fprintf(stderr, catgets(catd, CATSET, 244,
+ "Unsupported SSL method \"%s\"\n"), cp);
+ method = SSLv23_client_method();
+#endif
+ } else if (equal(cp, "tls1"))
method = TLSv1_client_method();
else {
fprintf(stderr, catgets(catd, CATSET, 244,

View File

@ -4,7 +4,7 @@
Summary: Enhanced implementation of the mailx command
Name: mailx
Version: 12.5
Release: 38%{?dist}
Release: 39%{?dist}
# MPLv1.1 .. nss.c, nsserr.c
License: BSD with advertising and MPLv1.1
URL: http://heirloom.sourceforge.net/mailx.html
@ -38,6 +38,8 @@ Patch12: mailx-12.5-nss-hostname-matching.patch
Patch13: mailx-12.5-encsplit.patch
# fix issues with openssl >= 1.1.0
Patch14: mailx-12.5-openssl.patch
# handle missing SSLv3 support
Patch15: mailx-12.5-no-SSLv3.patch
BuildRequires: make
BuildRequires: gcc
@ -95,6 +97,7 @@ as well as "nail" (the initial name of this project).
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
sed -i 's,/etc/nail.rc,%{mailrc},g' mailx.1
@ -198,6 +201,10 @@ fi
%changelog
* Fri May 21 2021 Nikola Forró <nforro@redhat.com> - 12.5-39
- Handle missing SSLv3 support
- resolves: #1952949
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 12.5-38
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937