support OTR_CAPATH in defaults

closes #336
This commit is contained in:
Jan-Piet Mens
2020-02-12 08:06:49 +01:00
parent 2bacc215eb
commit 5b0cc477cb
+5
View File
@@ -157,6 +157,11 @@ void get_defaults(char *filename, struct udata *ud)
ud->clientid = (value) ? strdup(value) : NULL;
}
if (config_lookup_string(cf, "OTR_CAPATH", &value) != CONFIG_FALSE) {
if (ud->capath) free(ud->capath);
ud->capath = (value) ? strdup(value) : NULL;
}
if (config_lookup_string(cf, "OTR_CAFILE", &value) != CONFIG_FALSE) {
if (ud->cafile) free(ud->cafile);
ud->cafile = (value) ? strdup(value) : NULL;