mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-06 00:00:47 -04:00
Avoid enumerating certificates with non-matching key type
If the key type was specified but the ID was NULL or matched a subject, it was possible that a certificate was returned that didn't actually match the requested key type. Closes strongswan/strongswan#141.
This commit is contained in:
parent
55dd0361b8
commit
3aa7b2dc3a
@ -208,6 +208,11 @@ CALLBACK(certs_filter, bool,
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
public->destroy(public);
|
||||
continue;
|
||||
}
|
||||
public->destroy(public);
|
||||
}
|
||||
else if (data->key != KEY_ANY)
|
||||
|
@ -108,6 +108,11 @@ CALLBACK(certs_filter, bool,
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
public->destroy(public);
|
||||
continue;
|
||||
}
|
||||
public->destroy(public);
|
||||
}
|
||||
else if (data->key != KEY_ANY)
|
||||
|
Loading…
x
Reference in New Issue
Block a user