actually use the tls settings on upgrade, and disconnect gracefully

This commit is contained in:
Ailin Nemui 2021-04-06 19:31:10 +02:00
commit f2795abcc5
11 changed files with 117 additions and 30 deletions

View file

@ -165,14 +165,10 @@ static void cmd_server_add_modify(const char *data, gboolean add)
else if (g_hash_table_lookup(optlist, "4"))
rec->family = AF_INET;
if (g_hash_table_lookup(optlist, "tls") || g_hash_table_lookup(optlist, "ssl")) {
if (g_hash_table_lookup(optlist, "tls") || g_hash_table_lookup(optlist, "ssl"))
rec->use_tls = TRUE;
}
else if (g_hash_table_lookup(optlist, "notls") || g_hash_table_lookup(optlist, "nossl")) {
else if (g_hash_table_lookup(optlist, "notls") || g_hash_table_lookup(optlist, "nossl"))
rec->use_tls = FALSE;
/* tls_verify implies use_tls, disable it explicitly */
rec->tls_verify = FALSE;
}
value = g_hash_table_lookup(optlist, "tls_cert");
if (value == NULL)