auth-cfg: Make IKE signature schemes configurable
This also restores the charon.signature_authentication_constraints functionality, that is, if no explicit IKE signature schemes are configured we apply all regular signature constraints as IKE constraints.
This commit is contained in:
@@ -506,14 +506,15 @@ static auth_cfg_t *build_auth_cfg(private_stroke_config_t *this,
|
||||
}
|
||||
|
||||
/* authentication metod (class, actually) */
|
||||
if (strpfx(auth, "pubkey") ||
|
||||
if (strpfx(auth, "ike:") ||
|
||||
strpfx(auth, "pubkey") ||
|
||||
strpfx(auth, "rsa") ||
|
||||
strpfx(auth, "ecdsa") ||
|
||||
strpfx(auth, "bliss"))
|
||||
{
|
||||
cfg->add(cfg, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_PUBKEY);
|
||||
build_crl_policy(cfg, local, msg->add_conn.crl_policy);
|
||||
cfg->add_pubkey_constraints(cfg, auth);
|
||||
cfg->add_pubkey_constraints(cfg, auth, TRUE);
|
||||
}
|
||||
else if (streq(auth, "psk") || streq(auth, "secret"))
|
||||
{
|
||||
@@ -546,7 +547,7 @@ static auth_cfg_t *build_auth_cfg(private_stroke_config_t *this,
|
||||
if (pos)
|
||||
{
|
||||
*pos = 0;
|
||||
cfg->add_pubkey_constraints(cfg, pos + 1);
|
||||
cfg->add_pubkey_constraints(cfg, pos + 1, FALSE);
|
||||
}
|
||||
type = eap_vendor_type_from_string(auth);
|
||||
if (type)
|
||||
|
||||
@@ -955,13 +955,14 @@ CALLBACK(parse_auth, bool,
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (strpfx(buf, "pubkey") ||
|
||||
if (strpfx(buf, "ike:") ||
|
||||
strpfx(buf, "pubkey") ||
|
||||
strpfx(buf, "rsa") ||
|
||||
strpfx(buf, "ecdsa") ||
|
||||
strpfx(buf, "bliss"))
|
||||
{
|
||||
cfg->add(cfg, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_PUBKEY);
|
||||
cfg->add_pubkey_constraints(cfg, buf);
|
||||
cfg->add_pubkey_constraints(cfg, buf, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
if (strcaseeq(buf, "psk"))
|
||||
|
||||
Reference in New Issue
Block a user