diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-02-01 11:16:42 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-02-07 10:52:24 +0100 |
commit | 865fd804ee58f448fa5d766e6e0a36917768fdec (patch) | |
tree | a2a5c5434166983e51c9bf41eb4c4d8ec628ce75 /src/libcharon/plugins/eap_dynamic/eap_dynamic.c | |
parent | 124a1eb8cff47944757eba2705121ac621ed9f0c (diff) | |
download | strongswan-865fd804ee58f448fa5d766e6e0a36917768fdec.tar.bz2 strongswan-865fd804ee58f448fa5d766e6e0a36917768fdec.tar.xz |
eap-dynamic: Publish the get_auth() method of the wrapped EAP method
Fixes #2238.
Diffstat (limited to 'src/libcharon/plugins/eap_dynamic/eap_dynamic.c')
-rw-r--r-- | src/libcharon/plugins/eap_dynamic/eap_dynamic.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libcharon/plugins/eap_dynamic/eap_dynamic.c b/src/libcharon/plugins/eap_dynamic/eap_dynamic.c index d0f0595de..83ccd3a8a 100644 --- a/src/libcharon/plugins/eap_dynamic/eap_dynamic.c +++ b/src/libcharon/plugins/eap_dynamic/eap_dynamic.c @@ -94,6 +94,13 @@ static eap_method_t *load_method(private_eap_dynamic_t *this, return method; } +METHOD(eap_method_t, get_auth, auth_cfg_t*, + private_eap_dynamic_t *this) +{ + /* get_auth() is only registered if the EAP method supports it */ + return this->method->get_auth(this->method); +} + /** * Select the first method we can instantiate and is supported by both peers. */ @@ -135,6 +142,10 @@ static void select_method(private_eap_dynamic_t *this) this->method = load_method(this, entry->type, entry->vendor); if (this->method) { + if (this->method->get_auth) + { + this->public.interface.get_auth = _get_auth; + } if (entry->vendor) { DBG1(DBG_IKE, "vendor specific EAP method %d-%d selected", @@ -211,6 +222,7 @@ METHOD(eap_method_t, process, status_t, /* restart with a different method */ this->method->destroy(this->method); this->method = NULL; + this->public.interface.get_auth = NULL; return initiate(this, out); } if (!this->other_types) |