diff options
author | Kevin Wolf <kwolf@redhat.com> | 2015-07-17 19:44:10 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-07-20 13:35:45 +0200 |
commit | bd09594603f1498e7623f0030988b62e2052f7da (patch) | |
tree | 6e0750761da45f36fb8ebe777f0172488dce8f0e /crypto/cipher-nettle.c | |
parent | 71358470eec668f5dc53def25e585ce250cea9bf (diff) |
crypto: Fix aes_decrypt_wrapper()
Commit d3462e3 broke qcow2's encryption functionality by using encrypt
instead of decrypt in the wrapper function it introduces. This was found
by qemu-iotests case 134.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'crypto/cipher-nettle.c')
-rw-r--r-- | crypto/cipher-nettle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cipher-nettle.c b/crypto/cipher-nettle.c index a55a8e8bc5..b01cb1c857 100644 --- a/crypto/cipher-nettle.c +++ b/crypto/cipher-nettle.c @@ -47,7 +47,7 @@ static void aes_encrypt_wrapper(cipher_ctx_t ctx, cipher_length_t length, static void aes_decrypt_wrapper(cipher_ctx_t ctx, cipher_length_t length, uint8_t *dst, const uint8_t *src) { - aes_encrypt(ctx, length, dst, src); + aes_decrypt(ctx, length, dst, src); } static void des_encrypt_wrapper(cipher_ctx_t ctx, cipher_length_t length, |