ikev1: Pass current auth-cfg when looking for key to determine auth method
If multiple certificates use the same subjects we might choose the wrong one otherwise. This way we use the one referenced with leftcert and stored in the auth-cfg and we actually do the same thing later in the pubkey authenticator. Fixes #1077.
This commit is contained in:
parent
49a20ef019
commit
47ee60177e
|
@ -404,7 +404,7 @@ static auth_method_t get_pubkey_method(private_phase1_t *this, auth_cfg_t *auth)
|
||||||
id = (identification_t*)auth->get(auth, AUTH_RULE_IDENTITY);
|
id = (identification_t*)auth->get(auth, AUTH_RULE_IDENTITY);
|
||||||
if (id)
|
if (id)
|
||||||
{
|
{
|
||||||
private = lib->credmgr->get_private(lib->credmgr, KEY_ANY, id, NULL);
|
private = lib->credmgr->get_private(lib->credmgr, KEY_ANY, id, auth);
|
||||||
if (private)
|
if (private)
|
||||||
{
|
{
|
||||||
switch (private->get_type(private))
|
switch (private->get_type(private))
|
||||||
|
|
Loading…
Reference in New Issue