aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-07-06 16:57:17 +0200
committerMartin Willi <martin@revosec.ch>2012-07-16 14:53:38 +0200
commitce73fc19dbc36d089e595e452356deccd8afcd6f (patch)
treeba7f244b7e566bd86d3e87e6992d831203322445 /src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c
parent3b96189a2afa4949e1d9cdf7c9fa8244d8d817f0 (diff)
downloadstrongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.bz2
strongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.xz
Add a return value to crypter_t.set_key()
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);