From d2b1d4378e298b76e87ee9165923d675412935ab Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Wed, 8 Sep 2010 11:01:47 +0200 Subject: generalized tls_eap_t to support EAP_TNC wrapping the TNC_IF_TNCCS protocol --- src/libcharon/plugins/eap_tls/eap_tls.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/libcharon/plugins/eap_tls/eap_tls.c') diff --git a/src/libcharon/plugins/eap_tls/eap_tls.c b/src/libcharon/plugins/eap_tls/eap_tls.c index 09b46ffd9..2980d74b2 100644 --- a/src/libcharon/plugins/eap_tls/eap_tls.c +++ b/src/libcharon/plugins/eap_tls/eap_tls.c @@ -123,6 +123,7 @@ static eap_tls_t *eap_tls_create(identification_t *server, { private_eap_tls_t *this; size_t frag_size; + tls_t *tls; INIT(this, .public = { @@ -139,8 +140,13 @@ static eap_tls_t *eap_tls_create(identification_t *server, frag_size = lib->settings->get_int(lib->settings, "charon.plugins.eap-tls.fragment_size", MAX_FRAGMENT_LEN); - this->tls_eap = tls_eap_create(EAP_TLS, is_server, server, peer, - NULL, frag_size); + tls = tls_create(is_server, server, peer, TLS_PURPOSE_EAP_TLS, NULL); + if (!tls) + { + free(this); + return NULL; + } + this->tls_eap = tls_eap_create(EAP_TLS, tls, frag_size); if (!this->tls_eap) { free(this); -- cgit v1.2.3