nm: Make global CA directory configurable

This commit is contained in:
Tobias Brunner 2016-08-31 18:08:38 +02:00
parent 3713d3024f
commit 97c74b565b
3 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,7 @@ options = \
options/attest.opt \
options/charon.opt \
options/charon-logging.opt \
options/charon-nm.opt \
options/charon-systemd.opt \
options/imcv.opt \
options/imv_policy_manager.opt \

View File

@ -0,0 +1,3 @@
charon-nm.ca_dir = <default>
Directory from which to load CA certificates if no certificate is
configured.

View File

@ -396,7 +396,8 @@ static gboolean connect_(NMVPNPlugin *plugin, NMConnection *connection,
else
{
/* no certificate defined, fall back to system-wide CA certificates */
priv->creds->load_ca_dir(priv->creds, NM_CA_DIR);
priv->creds->load_ca_dir(priv->creds, lib->settings->get_str(
lib->settings, "charon-nm.ca_dir", NM_CA_DIR));
}
if (!gateway)
{