diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-03-08 23:19:13 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-03-13 16:27:17 +0100 |
commit | 135822e11bfaa9b33a4893f00d0f12a97bf01d9f (patch) | |
tree | 591738edd10cb91498c59ac666e29c012629bfc4 | |
parent | cd9bde335ce883082c8fbc1703e9d0e6d9ebebe7 (diff) | |
download | strongswan-135822e11bfaa9b33a4893f00d0f12a97bf01d9f.tar.bz2 strongswan-135822e11bfaa9b33a4893f00d0f12a97bf01d9f.tar.xz |
define peer and server identities
-rw-r--r-- | src/libcharon/plugins/tnc_pdp/tnc_pdp.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libcharon/plugins/tnc_pdp/tnc_pdp.c b/src/libcharon/plugins/tnc_pdp/tnc_pdp.c index 6b0021dc2..52c52c503 100644 --- a/src/libcharon/plugins/tnc_pdp/tnc_pdp.c +++ b/src/libcharon/plugins/tnc_pdp/tnc_pdp.c @@ -227,9 +227,16 @@ static void process_eap(private_tnc_pdp_t *this, radius_message_t *request, if (eap_type == EAP_IDENTITY) { identification_t *server, *peer; + chunk_t eap_identity; + + if (message.len < 5) + { + return; + } + eap_identity = chunk_create(message.ptr + 5, message.len - 5); + peer = identification_create_from_data(eap_identity); + server = identification_create_from_string("%any"); - peer = identification_create_from_string("carol@strongswan.org"); - server = identification_create_from_string("server"); this->method = charon->eap->create_instance(charon->eap, EAP_MD5, 0, EAP_SERVER, server, peer); if (!this->method) |