slackbuilds_ponce/network/emailrelay/patches/a9dcd228875a40ef2b475ff6f328332bd6f6e4f6.patch
Andrew Clemons a8a54eb166 network/emailrelay: Added (SMTP proxy and store-and-forward MTA).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2017-02-24 23:52:01 +07:00

31 lines
1.1 KiB
Diff

From a9dcd228875a40ef2b475ff6f328332bd6f6e4f6 Mon Sep 17 00:00:00 2001
From: Andrew Clemons <andrew.clemons@gmail.com>
Date: Thu, 5 May 2016 12:56:52 +1200
Subject: [PATCH] --tls-config 3 only enabled SSLv3
This flag is meant to enable SSLv3 and any later protocol but actually
only enabled SSLv3.
https://www.openssl.org/docs/man1.0.1/ssl/SSLv3_method.html
---
src/gssl/gssl_openssl.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/gssl/gssl_openssl.cpp b/src/gssl/gssl_openssl.cpp
index f64ad94..f8a225f 100644
--- a/src/gssl/gssl_openssl.cpp
+++ b/src/gssl/gssl_openssl.cpp
@@ -292,9 +292,10 @@ GSsl::Context::Context( const std::string & pem_file , unsigned int flags )
{
if( (flags&3U) == 2U )
m_ssl_ctx = SSL_CTX_new(SSLv23_method()) ;
- else if( (flags&3U) == 3U )
- m_ssl_ctx = SSL_CTX_new(SSLv3_method()) ;
- else {
+ else if( (flags&3U) == 3U ) {
+ m_ssl_ctx = SSL_CTX_new(SSLv23_method()) ;
+ SSL_CTX_set_options(m_ssl_ctx, SSL_OP_NO_SSLv2) ;
+ } else {
m_ssl_ctx = SSL_CTX_new(SSLv23_method()) ;
SSL_CTX_set_options(m_ssl_ctx, SSL_OP_NO_SSLv2| SSL_OP_NO_SSLv3) ;
}