diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-08-25 15:37:26 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-08-25 15:37:26 +0200 |
commit | 6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349 (patch) | |
tree | 009fc492961e13860d2a4bc2de8caf2bbe2975e7 /src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c | |
parent | c83921a2b566aa9d55d8ccc7258f04fca6292ee6 (diff) | |
download | vyos-strongswan-6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349.tar.gz vyos-strongswan-6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349.zip |
Imported Upstream version 5.1.0
Diffstat (limited to 'src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c')
-rw-r--r-- | src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c b/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c index 96f437583..49e3dd142 100644 --- a/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c +++ b/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c @@ -782,7 +782,7 @@ static status_t process_peer_success(private_eap_mschapv2_t *this, enumerator = enumerator_create_token(message, " ", " "); while (enumerator->enumerate(enumerator, &token)) { - if (strneq(token, "S=", 2)) + if (strpfx(token, "S=")) { chunk_t hex; token += 2; @@ -795,7 +795,7 @@ static status_t process_peer_success(private_eap_mschapv2_t *this, hex = chunk_create(token, AUTH_RESPONSE_LEN - 2); auth_string = chunk_from_hex(hex, NULL); } - else if (strneq(token, "M=", 2)) + else if (strpfx(token, "M=")) { token += 2; msg = strdup(token); @@ -864,16 +864,16 @@ static status_t process_peer_failure(private_eap_mschapv2_t *this, enumerator = enumerator_create_token(message, " ", " "); while (enumerator->enumerate(enumerator, &token)) { - if (strneq(token, "E=", 2)) + if (strpfx(token, "E=")) { token += 2; error = atoi(token); } - else if (strneq(token, "R=", 2)) + else if (strpfx(token, "R=")) { /* ignore retriable */ } - else if (strneq(token, "C=", 2)) + else if (strpfx(token, "C=")) { chunk_t hex; token += 2; @@ -886,11 +886,11 @@ static status_t process_peer_failure(private_eap_mschapv2_t *this, hex = chunk_create(token, 2 * CHALLENGE_LEN); challenge = chunk_from_hex(hex, NULL); } - else if (strneq(token, "V=", 2)) + else if (strpfx(token, "V=")) { /* ignore version */ } - else if (strneq(token, "M=", 2)) + else if (strpfx(token, "M=")) { token += 2; msg = strdup(token); |