diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-04-17 17:44:10 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-04-18 18:50:14 +0200 |
commit | 7e84c4275c03b1aaf3c4a2077b08f67173fad382 (patch) | |
tree | 0972d8a15b4252cad0891dee635cbdae09e8d9bc /src/libcharon/plugins/stroke/stroke_config.c | |
parent | ebc1ffe45100d31ca0094fb407747a0ad995bf8e (diff) | |
download | strongswan-7e84c4275c03b1aaf3c4a2077b08f67173fad382.tar.bz2 strongswan-7e84c4275c03b1aaf3c4a2077b08f67173fad382.tar.xz |
Removed auth_cfg_t.replace_value() and replaced usages with add().
replace_value() was used to replace identities. Since for these the latest is
now returned by get(), adding the new identity with add() is sufficient.
Diffstat (limited to 'src/libcharon/plugins/stroke/stroke_config.c')
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_config.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_config.c b/src/libcharon/plugins/stroke/stroke_config.c index 6b7481988..5a6c22fb3 100644 --- a/src/libcharon/plugins/stroke/stroke_config.c +++ b/src/libcharon/plugins/stroke/stroke_config.c @@ -1039,11 +1039,7 @@ METHOD(stroke_config_t, set_user_credentials, void, auth_class = (uintptr_t)auth_cfg->get(auth_cfg, AUTH_RULE_AUTH_CLASS); if (auth_class == AUTH_CLASS_EAP) { - identity = id->clone(id); - if (!auth_cfg->replace_value(auth_cfg, AUTH_RULE_EAP_IDENTITY, identity)) - { - auth_cfg->add(auth_cfg, AUTH_RULE_EAP_IDENTITY, identity); - } + auth_cfg->add(auth_cfg, AUTH_RULE_EAP_IDENTITY, id->clone(id)); /* if aaa_identity is specified use that as remote ID */ identity = auth_cfg->get(auth_cfg, AUTH_RULE_AAA_IDENTITY); if (identity && identity->get_type(identity) != ID_ANY) |