From f5926fbd2392476f918fb1ab2a405c1c451359a1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 31 May 2021 01:11:19 +0100 Subject: Consistently set the SSL state in /reconnect. We need to use a temporary variable here as we're overwriting the existing server object which may have values set here already. --- src/common/outbound.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/common/outbound.c') diff --git a/src/common/outbound.c b/src/common/outbound.c index 0248a58d..c39a1d46 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -3227,17 +3227,21 @@ cmd_reconnect (struct session *sess, char *tbuf, char *word[], char *word_eol[]) int offset = 0; #ifdef USE_OPENSSL + int use_ssl = FALSE; + int use_ssl_noverify = FALSE; if (g_strcmp0 (word[2], "-ssl") == 0) { - serv->use_ssl = TRUE; - serv->accept_invalid_cert = FALSE; + use_ssl = TRUE; + use_ssl_noverify = FALSE; offset++; /* args move up by 1 word */ } else if (g_strcmp0 (word[2], "-ssl-noverify") == 0) { - serv->use_ssl = TRUE; - serv->accept_invalid_cert = TRUE; + use_ssl = TRUE; + use_ssl_noverify = TRUE; offset++; /* args move up by 1 word */ } + serv->use_ssl = use_ssl; + serv->accept_invalid_cert = use_ssl_noverify; #endif if (*word[4+offset]) -- cgit 1.4.1