diff options
| author | Martin Willi <martin@strongswan.org> | 2009-04-14 10:34:24 +0000 |
|---|---|---|
| committer | Martin Willi <martin@strongswan.org> | 2009-04-14 10:34:24 +0000 |
| commit | a44bb9345f0482b3dace19a27ee40320ddadc75f (patch) | |
| tree | 34d75bd95b2868900213e13c31ddd892d2fd4904 /src/charon/plugins/stroke/stroke_cred.c | |
| parent | 6e5c8d9413234b18a0631cddadd973a9f509708b (diff) | |
| download | strongswan-a44bb9345f04.tar.bz2 strongswan-a44bb9345f04.tar.xz | |
merged multi-auth branch back into trunk
Diffstat (limited to 'src/charon/plugins/stroke/stroke_cred.c')
| -rw-r--r-- | src/charon/plugins/stroke/stroke_cred.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/charon/plugins/stroke/stroke_cred.c b/src/charon/plugins/stroke/stroke_cred.c index 434aec22b..7fb33da9e 100644 --- a/src/charon/plugins/stroke/stroke_cred.c +++ b/src/charon/plugins/stroke/stroke_cred.c @@ -905,26 +905,13 @@ static void load_secrets(private_stroke_cred_t *this) continue; } - if (type == SHARED_EAP) + /* NULL terminate the ID string */ + *(id.ptr + id.len) = '\0'; + peer_id = identification_create_from_string(id.ptr); + if (peer_id->get_type(peer_id) == ID_ANY) { - /* we use a special EAP identity type for EAP secrets */ - peer_id = identification_create_from_encoding(ID_EAP, id); - } - else - { - /* NULL terminate the ID string */ - *(id.ptr + id.len) = '\0'; - peer_id = identification_create_from_string(id.ptr); - if (peer_id == NULL) - { - DBG1(DBG_CFG, "line %d: malformed ID: %s", line_nr, id.ptr); - goto error; - } - if (peer_id->get_type(peer_id) == ID_ANY) - { - peer_id->destroy(peer_id); - continue; - } + peer_id->destroy(peer_id); + continue; } shared_key->add_owner(shared_key, peer_id); |
