summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2018-02-05 20:25:23 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2018-02-05 20:25:26 +0100
commit176aa191380e5d63a981f08f537deffdd78f491a (patch)
treeaff8ea8cf44d22f30f48066a47a6283205ffecca
parent6d1c2c0ca26558d044dfcb69b663ea3e0c795ab5 (diff)
downloadgnutls-tmp-aesni-gcm-fix.tar.gz
accelerated: fix use of aesni_ecb_encrypt()tmp-aesni-gcm-fix
Previously we assumed that the nettle GCM internal functions will use the provided ECB function for single block encryption. Newer versions no longer operate that way. Ensure that we are compatible with them. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r--lib/accelerated/x86/aes-gcm-x86-aesni.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/accelerated/x86/aes-gcm-x86-aesni.c b/lib/accelerated/x86/aes-gcm-x86-aesni.c
index 9cae528912..7c6e4b1e58 100644
--- a/lib/accelerated/x86/aes-gcm-x86-aesni.c
+++ b/lib/accelerated/x86/aes-gcm-x86-aesni.c
@@ -49,7 +49,7 @@ static void x86_aes_encrypt(const void *_ctx,
{
AES_KEY *ctx = (void*)_ctx;
- aesni_ecb_encrypt(src, dst, 16, ctx, 1);
+ aesni_ecb_encrypt(src, dst, length, ctx, 1);
}
static void x86_aes128_set_encrypt_key(void *_ctx,