aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-12-16 16:18:11 +0100
committerMartin Willi <martin@revosec.ch>2011-01-05 16:46:03 +0100
commit58be32e88e605ef5374244dceb249689a3547ea6 (patch)
treee9880ea75da135d6836d75c16d1aa5d0df0edbea /src
parent5595d2bcff0d1ad9f03422cc2cdf428de146195d (diff)
downloadstrongswan-58be32e88e605ef5374244dceb249689a3547ea6.tar.bz2
strongswan-58be32e88e605ef5374244dceb249689a3547ea6.tar.xz
Added a cert_policy option to conftest configurations
Diffstat (limited to 'src')
-rw-r--r--src/conftest/config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/conftest/config.c b/src/conftest/config.c
index 676a80c88..952141211 100644
--- a/src/conftest/config.c
+++ b/src/conftest/config.c
@@ -247,7 +247,7 @@ static peer_cfg_t *load_peer_config(private_config_t *this,
child_cfg_t *child_cfg;
enumerator_t *enumerator;
identification_t *lid, *rid;
- char *child;
+ char *child, *policy;
uintptr_t strength;
ike_cfg = load_ike_config(this, settings, config);
@@ -276,6 +276,11 @@ static peer_cfg_t *load_peer_config(private_config_t *this,
{
auth->add(auth, AUTH_RULE_ECDSA_STRENGTH, strength);
}
+ policy = settings->get_str(settings, "configs.%s.cert_policy", NULL, config);
+ if (policy)
+ {
+ auth->add(auth, AUTH_RULE_CERT_POLICY, strdup(policy));
+ }
auth->add(auth, AUTH_RULE_IDENTITY, rid);
peer_cfg->add_auth_cfg(peer_cfg, auth, FALSE);