diff options
| author | Martin Willi <martin@strongswan.org> | 2008-05-14 06:49:31 +0000 |
|---|---|---|
| committer | Martin Willi <martin@strongswan.org> | 2008-05-14 06:49:31 +0000 |
| commit | 0fd4caea6624ce250daa86f5ff8ef8a46a2f9f2b (patch) | |
| tree | fa79dc678546257195d5b36780d3d10bb564411c /src/charon/plugins | |
| parent | c0d1ebde71116cbe494b445da9c08cf5454ff201 (diff) | |
| download | strongswan-0fd4caea6624ce250daa86f5ff8ef8a46a2f9f2b.tar.bz2 strongswan-0fd4caea6624ce250daa86f5ff8ef8a46a2f9f2b.tar.xz | |
handle ID_KEY_ID as a ID_PUBKEY_SHA1 for authentication
Diffstat (limited to 'src/charon/plugins')
| -rw-r--r-- | src/charon/plugins/stroke/stroke_cred.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/charon/plugins/stroke/stroke_cred.c b/src/charon/plugins/stroke/stroke_cred.c index 9467248f0..52140cb9c 100644 --- a/src/charon/plugins/stroke/stroke_cred.c +++ b/src/charon/plugins/stroke/stroke_cred.c @@ -104,14 +104,22 @@ static bool private_filter(id_data_t *data, private_key_t **in, private_key_t **out) { identification_t *candidate; + id_type_t type; if (data->id == NULL) { *out = *in; return TRUE; } - candidate = (*in)->get_id(*in, data->id->get_type(data->id)); - if (candidate && data->id->equals(data->id, candidate)) + type = data->id->get_type(data->id); + if (type == ID_KEY_ID) + { /* handle ID_KEY_ID as a ID_PUBKEY_SHA1 */ + type = ID_PUBKEY_SHA1; + } + candidate = (*in)->get_id(*in, type); + if (candidate && + chunk_equals(candidate->get_encoding(candidate), + data->id->get_encoding(data->id))) { *out = *in; return TRUE; |
