Add AUTH_RULE_IDENTITY_LOOSE which allows to use IDr loosely as initiator

If it is set on an auth config IDr will not be sent, and later the configured
identity will not only be checked against the returned IDr, but also
against other identities contained in the responder's certificate.
This commit is contained in:
Tobias Brunner committed 2012-09-18 11:16:10 +02:00
1 parent cf1ec85207
commit 3a8852c76f
3 files changed
+28 -1

No files matched your search

+2 -1
View File
@@ -408,7 +408,8 @@ METHOD(task_t, build_i, status_t,
if (cfg)
{
idr = cfg->get(cfg, AUTH_RULE_IDENTITY);
if (idr && !idr->contains_wildcards(idr))
if (!cfg->get(cfg, AUTH_RULE_IDENTITY_LOOSE) && idr &&
!idr->contains_wildcards(idr))
{
this->ike_sa->set_other_id(this->ike_sa, idr->clone(idr));
id_payload = id_payload_create_from_identification(