aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c')
-rw-r--r--src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c b/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c
index c5c531e31..dd6f56fd9 100644
--- a/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c
+++ b/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c
@@ -339,8 +339,8 @@ static status_t ChallengeResponse(chunk_t challenge_hash, chunk_t password_hash,
chunk_t expanded, encrypted;
expanded = ExpandDESKey(keys[i]);
- crypter->set_key(crypter, expanded);
- if (!crypter->encrypt(crypter, challenge_hash, chunk_empty, &encrypted))
+ if (!crypter->set_key(crypter, expanded) ||
+ !crypter->encrypt(crypter, challenge_hash, chunk_empty, &encrypted))
{
chunk_clear(&expanded);
crypter->destroy(crypter);