aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2015-01-16 21:20:31 +0100
committerMatthias Andree <matthias.andree@gmx.de>2015-01-16 21:20:31 +0100
commite6340bf8226c37fc35d41e69348714cba1d7baf5 (patch)
treefce5a5288759a4fe8f213de11837be12c25287fa /socket.c
parenta2ae6f8d15d7caf815d7bdd13df833fd1b2af5cc (diff)
downloadfetchmail-e6340bf8226c37fc35d41e69348714cba1d7baf5.tar.gz
fetchmail-e6340bf8226c37fc35d41e69348714cba1d7baf5.tar.bz2
fetchmail-e6340bf8226c37fc35d41e69348714cba1d7baf5.zip
Also recognize OPENSSL_NO_SSLx.
These are the macros OpenSSL defines when configured with no-ssl2 or no-ssl3, the actual macro names are OPENSSL_NO_SSL2 and OPENSSL_NO_SSL3.
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/socket.c b/socket.c
index 91a21c23..732ae054 100644
--- a/socket.c
+++ b/socket.c
@@ -907,14 +907,14 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck
_ssl_context[sock] = NULL;
if(myproto) {
if(!strcasecmp("ssl2",myproto)) {
-#if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 > 0
+#if (HAVE_DECL_SSLV2_CLIENT_METHOD + 0 > 0) && (0 == OPENSSL_NO_SSL2 + 0)
_ctx[sock] = SSL_CTX_new(SSLv2_client_method());
#else
report(stderr, GT_("Your OpenSSL version does not support SSLv2.\n"));
return -1;
#endif
} else if(!strcasecmp("ssl3",myproto)) {
-#if HAVE_DECL_SSLV3_CLIENT_METHOD + 0 > 0
+#if (HAVE_DECL_SSLV3_CLIENT_METHOD + 0 > 0) && (0 == OPENSSL_NO_SSL3 + 0)
_ctx[sock] = SSL_CTX_new(SSLv3_client_method());
#else
report(stderr, GT_("Your OpenSSL version does not support SSLv3.\n"));