diff --git a/libesmtp-tlsv12.patch b/libesmtp-tlsv12.patch new file mode 100644 index 0000000..4efb26a --- /dev/null +++ b/libesmtp-tlsv12.patch @@ -0,0 +1,20 @@ +Index: libesmtp-1.0.6/smtp-tls.c +=================================================================== +--- libesmtp-1.0.6.orig/smtp-tls.c ++++ libesmtp-1.0.6/smtp-tls.c +@@ -201,8 +201,13 @@ starttls_create_ctx (smtp_session_t sess + 3207. Servers typically support SSL as well as TLS because some + versions of Netscape do not support TLS. I am assuming that all + currently deployed servers correctly support TLS. */ +- ctx = SSL_CTX_new (TLSv1_client_method ()); +- ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) ++ ctx = SSL_CTX_new (TLS_client_method()); ++ SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION); ++#else ++ ctx = SSL_CTX_new (SSLv23_client_method ()); ++ SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3); ++#endif + /* Load our keys and certificates. To avoid messing with configuration + variables etc, use fixed paths for the certificate store. These are + as follows :- diff --git a/libesmtp.changes b/libesmtp.changes index 0b1690e..85509ca 100644 --- a/libesmtp.changes +++ b/libesmtp.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Sep 30 14:58:41 UTC 2016 - crrodriguez@opensuse.org + +- Add libesmtp-tlsv12.patch: All TLS clients must support and use + the highest TLS version available if possible not only TLS 1.0. + Patch sent to upstream long time ago, no response. website + has also vanished from the internet. +- Pass --disable-isoc to configure, pick the compiler's default C + standard mode (currently gnu11). + ------------------------------------------------------------------- Mon Feb 4 14:39:53 UTC 2013 - coolo@suse.com diff --git a/libesmtp.spec b/libesmtp.spec index a2b9552..e288e2d 100644 --- a/libesmtp.spec +++ b/libesmtp.spec @@ -1,7 +1,7 @@ # # spec file for package libesmtp # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,8 @@ Source0: %{name}-%{version}.tar.bz2 Patch0: libesmtp-removedecls.diff # PATCH-MISSING-TAG -- See http://wiki.opensuse.org/Packaging/Patches Patch1: libesmtp-1.0.4-bloat.patch +# PATCH-FIX-UPSTREAM libesmtp-tlsv12.patch crrodriguez@opensuse.org -- All TLS clients must support and use the highest TLS version available +Patch2: libesmtp-tlsv12.patch BuildRequires: openssl-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -54,11 +56,13 @@ functionality is not that program's primary purpose. %setup -q %patch0 %patch1 +%patch2 -p1 %build %configure --disable-static --with-pic \ --enable-ntlm \ - --enable-etrn + --enable-etrn \ + --disable-isoc %{__make} %{?_smp_mflags} %install