charon-cmd: Only use loose identity matching if no IDr is configured

This commit is contained in:
Tobias Brunner
2026-01-15 14:10:59 +01:00
parent 757dce2ed3
commit e248fac362
+2 -1
View File
@@ -247,8 +247,9 @@ static void add_auth_cfg(private_cmd_connection_t *this, peer_cfg_t *peer_cfg,
else
{
id = identification_create_from_string(this->host);
/* only use this if remote ID was not configured explicitly */
auth->add(auth, AUTH_RULE_IDENTITY_LOOSE, TRUE);
}
auth->add(auth, AUTH_RULE_IDENTITY_LOOSE, TRUE);
}
auth->add(auth, AUTH_RULE_IDENTITY, id);
peer_cfg->add_auth_cfg(peer_cfg, auth, local);