diff options
author | Martin Willi <martin@strongswan.org> | 2009-10-26 08:47:40 +0100 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-10-26 08:47:40 +0100 |
commit | 140816b055440067285e16169d2722906476a8e3 (patch) | |
tree | 5f70d886250f18609cb555efd39c1c582e3d75cf | |
parent | 3dc40325d5eaa147f7692375058fe659caa49133 (diff) | |
download | strongswan-140816b055440067285e16169d2722906476a8e3.tar.bz2 strongswan-140816b055440067285e16169d2722906476a8e3.tar.xz |
Query secrets in EAP-MD5 with me/other identities, fixing lookup in NetworkManager
-rw-r--r-- | src/charon/plugins/eap_md5/eap_md5.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/charon/plugins/eap_md5/eap_md5.c b/src/charon/plugins/eap_md5/eap_md5.c index 27c20489d..0eda8f755 100644 --- a/src/charon/plugins/eap_md5/eap_md5.c +++ b/src/charon/plugins/eap_md5/eap_md5.c @@ -78,18 +78,18 @@ struct eap_md5_header_t { /** * Hash the challenge string, create response */ -static status_t hash_challenge(private_eap_md5_t *this, chunk_t *response) +static status_t hash_challenge(private_eap_md5_t *this, chunk_t *response, + identification_t *me, identification_t *other) { shared_key_t *shared; chunk_t concat; hasher_t *hasher; shared = charon->credentials->get_shared(charon->credentials, SHARED_EAP, - this->server, this->peer); + me, other); if (shared == NULL) { - DBG1(DBG_IKE, "no EAP key found for hosts '%Y' - '%Y'", - this->server, this->peer); + DBG1(DBG_IKE, "no EAP key found for hosts '%Y' - '%Y'", me, other); return NOT_FOUND; } concat = chunk_cata("ccc", chunk_from_thing(this->identifier), @@ -161,7 +161,7 @@ static status_t process_peer(private_eap_md5_t *this, DBG1(DBG_IKE, "received invalid EAP-MD5 message"); return FAILED; } - if (hash_challenge(this, &response) != SUCCESS) + if (hash_challenge(this, &response, this->peer, this->server) != SUCCESS) { return FAILED; } @@ -192,7 +192,7 @@ static status_t process_server(private_eap_md5_t *this, DBG1(DBG_IKE, "received invalid EAP-MD5 message"); return FAILED; } - if (hash_challenge(this, &expected) != SUCCESS) + if (hash_challenge(this, &expected, this->server, this->peer) != SUCCESS) { return FAILED; } |