summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-08-21 16:15:13 -0400
committerJune McEnroe <june@causal.agency>2021-08-21 16:15:13 -0400
commit78afc824b486c370f55a200b659b2b7a82b92a0d (patch)
treed983027cc445a59f163f20d9ccbcdb9b5be81ea0
parentZero local-key memory before freeing it (diff)
downloadpounce-78afc824b486c370f55a200b659b2b7a82b92a0d.tar.gz
pounce-78afc824b486c370f55a200b659b2b7a82b92a0d.zip
Don't create new tls_server(3), just reconfigure
-rw-r--r--local.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/local.c b/local.c
index a7f4abb..92220c4 100644
--- a/local.c
+++ b/local.c
@@ -71,8 +71,7 @@ static byte *readFile(size_t *len, FILE *file) {
 }
 
 void localConfig(FILE *cert, FILE *priv, FILE *ca, bool require) {
-	tls_free(server);
-	server = tls_server();
+	if (!server) server = tls_server();
 	if (!server) errx(EX_SOFTWARE, "tls_server");
 
 	struct tls_config *config = tls_config_new();
McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe