From ce73fc19dbc36d089e595e452356deccd8afcd6f Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Fri, 6 Jul 2012 16:57:17 +0200 Subject: Add a return value to crypter_t.set_key() --- src/libstrongswan/plugins/pkcs8/pkcs8_builder.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libstrongswan/plugins/pkcs8/pkcs8_builder.c') 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; } -- cgit v1.2.3