aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2016-12-12 02:59:40 +0100
committerMatthias Andree <matthias.andree@gmx.de>2016-12-12 02:59:40 +0100
commit69a4e7d82eb715a276dcc725e80a7bd4e39d747d (patch)
treedb7901bfa7fbce674678cfdd38560edb9dfd6938 /socket.c
parent66a5638ff6c9b1fae89a9dd7bbc295f33711b006 (diff)
downloadfetchmail-69a4e7d82eb715a276dcc725e80a7bd4e39d747d.tar.gz
fetchmail-69a4e7d82eb715a276dcc725e80a7bd4e39d747d.tar.bz2
fetchmail-69a4e7d82eb715a276dcc725e80a7bd4e39d747d.zip
Fixup protocol version handling in OpenSSL 1.0.X.
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/socket.c b/socket.c
index f6a3b19c..6043b49b 100644
--- a/socket.c
+++ b/socket.c
@@ -887,6 +887,10 @@ static const char *SSLCertGetCN(const char *mycert,
/* OSSL_proto_version_logic for OpenSSL 1.0.x and LibreSSL */
static int OSSL10X_proto_version_logic(int sock, const char **myproto, int *avoid_ssl_versions)
{
+ if (!*myproto) {
+ *myproto = "auto";
+ }
+
if (!strcasecmp("ssl3", *myproto)) {
#if (HAVE_DECL_SSLV3_CLIENT_METHOD > 0) && (0 == OPENSSL_NO_SSL3 + 0)
_ctx[sock] = SSL_CTX_new(SSLv3_client_method());