commit d6a1f0517342b78cda0124ddd40a267bdeb21e46
parent ff34cac72c75d8a27768d816e21b8964d17f374f
Author: wwp <wwp@free.fr>
Date: Thu, 12 Apr 2018 17:35:04 +0200
Disable SSLv3 in libspamc.c (patch from Debian spamassassin package).
Diffstat:
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/plugins/spamassassin/libspamc.c b/src/plugins/spamassassin/libspamc.c
@@ -1188,7 +1188,7 @@ int message_filter(struct transport *tp, const char *username,
unsigned int throwaway;
SSL_CTX *ctx = NULL;
SSL *ssl = NULL;
- SSL_METHOD *meth;
+ const SSL_METHOD *meth;
char zlib_on = 0;
unsigned char *zlib_buf = NULL;
int zlib_bufsiz = 0;
@@ -1214,11 +1214,7 @@ int message_filter(struct transport *tp, const char *username,
if (flags & SPAMC_USE_SSL) {
#ifdef SPAMC_SSL
SSLeay_add_ssl_algorithms();
- if (flags & SPAMC_TLSV1) {
- meth = TLSv1_client_method();
- } else {
- meth = SSLv3_client_method(); /* default */
- }
+ meth = SSLv23_client_method();
SSL_load_error_strings();
ctx = SSL_CTX_new(meth);
#else
@@ -1597,7 +1593,7 @@ int message_tell(struct transport *tp, const char *username, int flags,
int failureval;
SSL_CTX *ctx = NULL;
SSL *ssl = NULL;
- SSL_METHOD *meth;
+ const SSL_METHOD *meth;
assert(tp != NULL);
assert(m != NULL);
@@ -1605,7 +1601,7 @@ int message_tell(struct transport *tp, const char *username, int flags,
if (flags & SPAMC_USE_SSL) {
#ifdef SPAMC_SSL
SSLeay_add_ssl_algorithms();
- meth = SSLv3_client_method();
+ meth = SSLv23_client_method();
SSL_load_error_strings();
ctx = SSL_CTX_new(meth);
#else