diff options
Diffstat (limited to 'src/libcharon/plugins/eap_ttls')
-rw-r--r-- | src/libcharon/plugins/eap_ttls/eap_ttls.c | 16 | ||||
-rw-r--r-- | src/libcharon/plugins/eap_ttls/eap_ttls_peer.c | 20 | ||||
-rw-r--r-- | src/libcharon/plugins/eap_ttls/eap_ttls_plugin.c | 4 | ||||
-rw-r--r-- | src/libcharon/plugins/eap_ttls/eap_ttls_server.c | 24 |
4 files changed, 34 insertions, 30 deletions
diff --git a/src/libcharon/plugins/eap_ttls/eap_ttls.c b/src/libcharon/plugins/eap_ttls/eap_ttls.c index ad3360dee..ccc326e14 100644 --- a/src/libcharon/plugins/eap_ttls/eap_ttls.c +++ b/src/libcharon/plugins/eap_ttls/eap_ttls.c @@ -431,13 +431,15 @@ static eap_ttls_t *eap_ttls_create(identification_t *server, private_eap_ttls_t *this; INIT(this, - .public.eap_method = { - .initiate = _initiate, - .process = _process, - .get_type = _get_type, - .is_mutual = _is_mutual, - .get_msk = _get_msk, - .destroy = _destroy, + .public = { + .eap_method = { + .initiate = _initiate, + .process = _process, + .get_type = _get_type, + .is_mutual = _is_mutual, + .get_msk = _get_msk, + .destroy = _destroy, + }, }, .is_server = is_server, ); diff --git a/src/libcharon/plugins/eap_ttls/eap_ttls_peer.c b/src/libcharon/plugins/eap_ttls/eap_ttls_peer.c index b675d9ab4..cbed4d12d 100644 --- a/src/libcharon/plugins/eap_ttls/eap_ttls_peer.c +++ b/src/libcharon/plugins/eap_ttls/eap_ttls_peer.c @@ -49,12 +49,12 @@ struct private_eap_ttls_peer_t { bool start_phase2; /** - * Current phase 2 EAP method + * Current phase 2 EAP method */ eap_method_t *method; /** - * Pending outbound EAP message + * Pending outbound EAP message */ eap_payload_t *out; @@ -123,7 +123,7 @@ METHOD(tls_application_t, process, status_t, return NEED_MORE; } } - + type = this->method->get_type(this->method, &vendor); if (type != received_type || vendor != received_vendor) @@ -156,7 +156,7 @@ METHOD(tls_application_t, process, status_t, DBG1(DBG_IKE, "%N method failed", eap_type_names, type); } return FAILED; - } + } } METHOD(tls_application_t, build, status_t, @@ -220,16 +220,16 @@ eap_ttls_peer_t *eap_ttls_peer_create(identification_t *server, private_eap_ttls_peer_t *this; INIT(this, - .public.application = { - .process = _process, - .build = _build, - .destroy = _destroy, + .public = { + .application = { + .process = _process, + .build = _build, + .destroy = _destroy, + }, }, .server = server->clone(server), .peer = peer->clone(peer), .start_phase2 = TRUE, - .method = NULL, - .out = NULL, .avp = eap_ttls_avp_create(), ); diff --git a/src/libcharon/plugins/eap_ttls/eap_ttls_plugin.c b/src/libcharon/plugins/eap_ttls/eap_ttls_plugin.c index 642e004fe..48e759dcc 100644 --- a/src/libcharon/plugins/eap_ttls/eap_ttls_plugin.c +++ b/src/libcharon/plugins/eap_ttls/eap_ttls_plugin.c @@ -38,7 +38,9 @@ plugin_t *eap_ttls_plugin_create() eap_ttls_plugin_t *this; INIT(this, - .plugin.destroy = _destroy, + .plugin = { + .destroy = _destroy, + }, ); charon->eap->add_method(charon->eap, EAP_TTLS, 0, EAP_SERVER, diff --git a/src/libcharon/plugins/eap_ttls/eap_ttls_server.c b/src/libcharon/plugins/eap_ttls/eap_ttls_server.c index 8401f85b2..94fd555eb 100644 --- a/src/libcharon/plugins/eap_ttls/eap_ttls_server.c +++ b/src/libcharon/plugins/eap_ttls/eap_ttls_server.c @@ -49,12 +49,12 @@ struct private_eap_ttls_server_t { bool start_phase2; /** - * Current phase 2 EAP method + * Current phase 2 EAP method */ eap_method_t *method; /** - * Pending outbound EAP message + * Pending outbound EAP message */ eap_payload_t *out; @@ -118,7 +118,7 @@ METHOD(tls_application_t, process, status_t, return FAILED; } } - + if (!received_vendor && received_type == EAP_IDENTITY) { chunk_t eap_id; @@ -184,7 +184,7 @@ METHOD(tls_application_t, process, status_t, return FAILED; } } - + if (this->method == 0) { DBG1(DBG_IKE, "no %N phase2 method installed", eap_type_names, EAP_TTLS); @@ -194,7 +194,7 @@ METHOD(tls_application_t, process, status_t, status = this->method->process(this->method, in, &this->out); in->destroy(in); - + switch (status) { case SUCCESS: @@ -218,7 +218,7 @@ METHOD(tls_application_t, process, status_t, DBG1(DBG_IKE, "%N method failed", eap_type_names, type); } return FAILED; - } + } return status; } @@ -285,16 +285,16 @@ eap_ttls_server_t *eap_ttls_server_create(identification_t *server, private_eap_ttls_server_t *this; INIT(this, - .public.application = { - .process = _process, - .build = _build, - .destroy = _destroy, + .public = { + .application = { + .process = _process, + .build = _build, + .destroy = _destroy, + }, }, .server = server->clone(server), .peer = peer->clone(peer), .start_phase2 = TRUE, - .method = NULL, - .out = NULL, .avp = eap_ttls_avp_create(), ); |