aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/pkcs8/pkcs8_builder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/pkcs8/pkcs8_builder.c')
-rw-r--r--src/libstrongswan/plugins/pkcs8/pkcs8_builder.c5
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);