summary refs log tree commit diff stats
path: root/src/common/outbound.c
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-05-31 01:11:19 +0100
committerPatrick <tingping@tingping.se>2021-06-17 19:47:34 -0500
commitf5926fbd2392476f918fb1ab2a405c1c451359a1 (patch)
tree04845ec24c50e32b16ac7b71a5bcdcb178bc6fb2 /src/common/outbound.c
parent623d93c6f14679ef04fb35b52cde40a08e377444 (diff)
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.
Diffstat (limited to 'src/common/outbound.c')
-rw-r--r--src/common/outbound.c12
1 files changed, 8 insertions, 4 deletions
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])