Initialize ca-related defaults with strdup_or_die()
authorFabian Keil <fk@fabiankeil.de>
Tue, 27 Sep 2022 10:14:12 +0000 (12:14 +0200)
committerFabian Keil <fk@fabiankeil.de>
Sat, 15 Oct 2022 12:37:28 +0000 (14:37 +0200)
... so errors aren't silently ignored.

loadcfg.c

index f98e084..6857fb4 100644 (file)
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -634,12 +634,12 @@ struct configuration_spec * load_config(void)
    config->proxy_args                = strdup_or_die("");
    config->forwarded_connect_retries = 0;
 #ifdef FEATURE_HTTPS_INSPECTION
-   config->ca_password               = strdup("");
-   ca_cert_file                      = strdup("cacert.crt");
-   ca_key_file                       = strdup("cakey.pem");
-   ca_directory                      = strdup("./CA");
-   trusted_cas_file                  = strdup("trustedCAs.pem");
-   certificate_directory             = strdup("./certs");
+   config->ca_password               = strdup_or_die("");
+   ca_cert_file                      = strdup_or_die("cacert.crt");
+   ca_key_file                       = strdup_or_die("cakey.pem");
+   ca_directory                      = strdup_or_die("./CA");
+   trusted_cas_file                  = strdup_or_die("trustedCAs.pem");
+   certificate_directory             = strdup_or_die("./certs");
 #endif
 
 #ifdef FEATURE_CLIENT_TAGS