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/pem/pem_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/pem/pem_builder.c')
-rw-r--r-- | src/libstrongswan/plugins/pem/pem_builder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/pem/pem_builder.c b/src/libstrongswan/plugins/pem/pem_builder.c index c1ce5c809..655491e53 100644 --- a/src/libstrongswan/plugins/pem/pem_builder.c +++ b/src/libstrongswan/plugins/pem/pem_builder.c @@ -125,7 +125,6 @@ static status_t pem_decrypt(chunk_t *blob, encryption_algorithm_t alg, encryption_algorithm_names, alg); return NOT_SUPPORTED; } - crypter->set_key(crypter, key); if (iv.len != crypter->get_iv_size(crypter) || blob->len % crypter->get_block_size(crypter)) @@ -134,7 +133,8 @@ static status_t pem_decrypt(chunk_t *blob, encryption_algorithm_t alg, DBG1(DBG_ASN, " data size is not multiple of block size"); return PARSE_ERROR; } - if (!crypter->decrypt(crypter, *blob, iv, &decrypted)) + if (!crypter->set_key(crypter, key) || + !crypter->decrypt(crypter, *blob, iv, &decrypted)) { crypter->destroy(crypter); return FAILED; |