Disable SSLv3 in libspamc.c (patch from Debian spamassassin package).
[claws.git] / src / plugins / spamassassin / libspamc.c
index 0be68e8c3fa3ee1d4443a7b26731dd54a0d8fe76..623c1ab33dbda4ee4cbca6f83d8f1d37307720c8 100644 (file)
@@ -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