aboutsummaryrefslogtreecommitdiffstats
path: root/src/libsimaka/simaka_crypto.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/libsimaka/simaka_crypto.c
parent3b96189a2afa4949e1d9cdf7c9fa8244d8d817f0 (diff)
downloadstrongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.bz2
strongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.xz
Add a return value to crypter_t.set_key()
Diffstat (limited to 'src/libsimaka/simaka_crypto.c')
-rw-r--r--src/libsimaka/simaka_crypto.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsimaka/simaka_crypto.c b/src/libsimaka/simaka_crypto.c
index cdb314068..91aad95ca 100644
--- a/src/libsimaka/simaka_crypto.c
+++ b/src/libsimaka/simaka_crypto.c
@@ -148,12 +148,12 @@ METHOD(simaka_crypto_t, derive_keys_full, bool,
k_auth = chunk_create(str.ptr + KENCR_LEN, KAUTH_LEN);
DBG3(DBG_LIB, "K_encr %B\nK_auth %B\nMSK %B", &k_encr, &k_auth, &msk);
- if (!this->signer->set_key(this->signer, k_auth))
+ if (!this->signer->set_key(this->signer, k_auth) ||
+ !this->crypter->set_key(this->crypter, k_encr))
{
chunk_clear(mk);
return FALSE;
}
- this->crypter->set_key(this->crypter, k_encr);
*msk = chunk_create(str.ptr + KENCR_LEN + KAUTH_LEN, MSK_LEN);
@@ -187,11 +187,11 @@ METHOD(simaka_crypto_t, derive_keys_reauth, bool,
k_auth = chunk_create(str.ptr + KENCR_LEN, KAUTH_LEN);
DBG3(DBG_LIB, "K_encr %B\nK_auth %B", &k_encr, &k_auth);
- if (!this->signer->set_key(this->signer, k_auth))
+ if (!this->signer->set_key(this->signer, k_auth) ||
+ !this->crypter->set_key(this->crypter, k_encr))
{
return FALSE;
}
- this->crypter->set_key(this->crypter, k_encr);
call_hook(this, k_encr, k_auth);