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/plugins/pkcs8/pkcs8_builder.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/plugins/pkcs8/pkcs8_builder.c')
-rw-r--r-- | src/libstrongswan/plugins/pkcs8/pkcs8_builder.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstrongswan/plugins/pkcs8/pkcs8_builder.c b/src/libstrongswan/plugins/pkcs8/pkcs8_builder.c index f9bef7786..9afd0d44d 100644 --- a/src/libstrongswan/plugins/pkcs8/pkcs8_builder.c +++ b/src/libstrongswan/plugins/pkcs8/pkcs8_builder.c @@ -168,9 +168,8 @@ static private_key_t *decrypt_private_key(chunk_t blob, { continue; } - - crypter->set_key(crypter, key); - if (!crypter->decrypt(crypter, blob, iv, &decrypted)) + if (!crypter->set_key(crypter, key) || + !crypter->decrypt(crypter, blob, iv, &decrypted)) { continue; } |