Use the group constraint in a more generic fashion, not only for attribute certificates
This commit is contained in:
@@ -413,7 +413,7 @@ static auth_cfg_t *build_auth_cfg(private_stroke_config_t *this,
|
||||
}
|
||||
}
|
||||
|
||||
/* AC groups */
|
||||
/* groups */
|
||||
if (end->groups)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
@@ -422,9 +422,8 @@ static auth_cfg_t *build_auth_cfg(private_stroke_config_t *this,
|
||||
enumerator = enumerator_create_token(end->groups, ",", " ");
|
||||
while (enumerator->enumerate(enumerator, &group))
|
||||
{
|
||||
identity = identification_create_from_encoding(ID_IETF_ATTR_STRING,
|
||||
chunk_create(group, strlen(group)));
|
||||
cfg->add(cfg, AUTH_RULE_AC_GROUP, identity);
|
||||
cfg->add(cfg, AUTH_RULE_GROUP,
|
||||
identification_create_from_string(group));
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ static void log_auth_cfgs(FILE *out, peer_cfg_t *peer_cfg, bool local)
|
||||
rules = auth->create_enumerator(auth);
|
||||
while (rules->enumerate(rules, &rule, &id))
|
||||
{
|
||||
if (rule == AUTH_RULE_AC_GROUP)
|
||||
if (rule == AUTH_RULE_GROUP)
|
||||
{
|
||||
fprintf(out, "%12s: group: %Y\n", name, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user