Added a left/rightcertpolicy keyword to specify certificatePolicy requirements

This commit is contained in:
Martin Willi
2011-01-07 15:51:35 +01:00
parent 1ed482d808
commit 6367de28ad
9 changed files with 30 additions and 2 deletions
@@ -429,6 +429,20 @@ static auth_cfg_t *build_auth_cfg(private_stroke_config_t *this,
enumerator->destroy(enumerator);
}
/* certificatePolicies */
if (end->cert_policy)
{
enumerator_t *enumerator;
char *policy;
enumerator = enumerator_create_token(end->cert_policy, ",", " ");
while (enumerator->enumerate(enumerator, &policy))
{
cfg->add(cfg, AUTH_RULE_CERT_POLICY, strdup(policy));
}
enumerator->destroy(enumerator);
}
/* authentication metod (class, actually) */
if (streq(auth, "pubkey") ||
streq(auth, "rsasig") || streq(auth, "rsa") ||
@@ -151,6 +151,7 @@ static void pop_end(stroke_msg_t *msg, const char* label, stroke_end_t *end)
pop_string(msg, &end->ca);
pop_string(msg, &end->ca2);
pop_string(msg, &end->groups);
pop_string(msg, &end->cert_policy);
pop_string(msg, &end->updown);
DBG2(DBG_CFG, " %s=%s", label, end->address);