diff options
author | Martin Willi <martin@revosec.ch> | 2012-07-06 16:11:15 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-07-16 14:53:38 +0200 |
commit | 3b96189a2afa4949e1d9cdf7c9fa8244d8d817f0 (patch) | |
tree | 16564618b94304c2bca7e925fc9e6693b6226161 /src/libstrongswan/plugins/pkcs8/pkcs8_builder.c | |
parent | e35abbe588636c5ca73d8aaa9082314289346bd9 (diff) | |
download | strongswan-3b96189a2afa4949e1d9cdf7c9fa8244d8d817f0.tar.bz2 strongswan-3b96189a2afa4949e1d9cdf7c9fa8244d8d817f0.tar.xz |
Add a return value to crypter_t.decrypt()
Diffstat (limited to 'src/libstrongswan/plugins/pkcs8/pkcs8_builder.c')
-rw-r--r-- | src/libstrongswan/plugins/pkcs8/pkcs8_builder.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstrongswan/plugins/pkcs8/pkcs8_builder.c b/src/libstrongswan/plugins/pkcs8/pkcs8_builder.c index 3e0601ce2..f9bef7786 100644 --- a/src/libstrongswan/plugins/pkcs8/pkcs8_builder.c +++ b/src/libstrongswan/plugins/pkcs8/pkcs8_builder.c @@ -170,7 +170,10 @@ static private_key_t *decrypt_private_key(chunk_t blob, } crypter->set_key(crypter, key); - crypter->decrypt(crypter, blob, iv, &decrypted); + if (!crypter->decrypt(crypter, blob, iv, &decrypted)) + { + continue; + } if (verify_padding(&decrypted)) { private_key = parse_private_key(decrypted); |