diff options
author | Martin Willi <martin@revosec.ch> | 2012-07-06 16:57:17 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-07-16 14:53:38 +0200 |
commit | ce73fc19dbc36d089e595e452356deccd8afcd6f (patch) | |
tree | ba7f244b7e566bd86d3e87e6992d831203322445 /src/libstrongswan/crypto/pkcs7.c | |
parent | 3b96189a2afa4949e1d9cdf7c9fa8244d8d817f0 (diff) | |
download | strongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.bz2 strongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.xz |
Add a return value to crypter_t.set_key()
Diffstat (limited to 'src/libstrongswan/crypto/pkcs7.c')
-rw-r--r-- | src/libstrongswan/crypto/pkcs7.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstrongswan/crypto/pkcs7.c b/src/libstrongswan/crypto/pkcs7.c index e422dae0e..ded388181 100644 --- a/src/libstrongswan/crypto/pkcs7.c +++ b/src/libstrongswan/crypto/pkcs7.c @@ -638,8 +638,8 @@ end: success = FALSE; /* decrypt the content */ - crypter->set_key(crypter, symmetric_key); - if (!crypter->decrypt(crypter, encrypted_content, iv, &this->data)) + if (!crypter->set_key(crypter, symmetric_key) || + !crypter->decrypt(crypter, encrypted_content, iv, &this->data)) { success = FALSE; goto failed; @@ -834,8 +834,8 @@ METHOD(pkcs7_t, build_envelopedData, bool, DBG3(DBG_LIB, " padded unencrypted data: %B", &in); /* symmetric encryption of data object */ - crypter->set_key(crypter, symmetricKey); - if (!crypter->encrypt(crypter, in, iv, &out)) + if (!crypter->set_key(crypter, symmetricKey) || + !crypter->encrypt(crypter, in, iv, &out)) { crypter->destroy(crypter); chunk_clear(&in); |