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, 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;
}