diff options
author | Martin Willi <martin@revosec.ch> | 2010-08-24 11:34:43 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-08-24 11:34:43 +0200 |
commit | 69e8bb2e8d61a8e7b2a889eaae9722a4e5ed51c6 (patch) | |
tree | 1e4fbeded6b1cd5b456a21c594f80a212d7f2b89 /src/libcharon/plugins/eap_ttls | |
parent | a2c12359691943ede12f7f515cbe97af1b193e7b (diff) | |
download | strongswan-69e8bb2e8d61a8e7b2a889eaae9722a4e5ed51c6.tar.bz2 strongswan-69e8bb2e8d61a8e7b2a889eaae9722a4e5ed51c6.tar.xz |
Pass NULL peer identity to omit TLS peer authentication, added eap-ttls.request_peer_auth option
Diffstat (limited to 'src/libcharon/plugins/eap_ttls')
-rw-r--r-- | src/libcharon/plugins/eap_ttls/eap_ttls.c | 5 | ||||
-rw-r--r-- | src/libcharon/plugins/eap_ttls/eap_ttls_avp.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/libcharon/plugins/eap_ttls/eap_ttls.c b/src/libcharon/plugins/eap_ttls/eap_ttls.c index 35a529091..be9e3ea6b 100644 --- a/src/libcharon/plugins/eap_ttls/eap_ttls.c +++ b/src/libcharon/plugins/eap_ttls/eap_ttls.c @@ -405,6 +405,11 @@ static eap_ttls_t *eap_ttls_create(identification_t *server, .is_server = is_server, ); + if (is_server && !lib->settings->get_bool(lib->settings, + "charon.plugins.eap-ttls.request_peer_auth", FALSE)) + { /* don't request peer authentication */ + peer = NULL; + } this->tls = tls_create(is_server, server, peer, TLS_PURPOSE_EAP_TTLS, application); if (!this->tls) diff --git a/src/libcharon/plugins/eap_ttls/eap_ttls_avp.c b/src/libcharon/plugins/eap_ttls/eap_ttls_avp.c index a621ffc3e..0eb5e94be 100644 --- a/src/libcharon/plugins/eap_ttls/eap_ttls_avp.c +++ b/src/libcharon/plugins/eap_ttls/eap_ttls_avp.c @@ -110,7 +110,7 @@ METHOD(eap_ttls_avp_t, process, status_t, } /* parse AVP header */ - header = tls_reader_create(this->input); + header = tls_reader_create(this->input); success = header->read_uint32(header, &avp_code) && header->read_uint8(header, &avp_flags) && header->read_uint24(header, &avp_len); @@ -154,7 +154,7 @@ METHOD(eap_ttls_avp_t, process, status_t, this->inpos = 0; this->process_header = TRUE; - return SUCCESS; + return SUCCESS; } METHOD(eap_ttls_avp_t, destroy, void, |