]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
accelerated: fix use of aesni_ecb_encrypt()
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 5 Feb 2018 19:25:23 +0000 (20:25 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 5 Feb 2018 19:25:26 +0000 (20:25 +0100)
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>
lib/accelerated/x86/aes-gcm-x86-aesni.c

index 9cae52891234479f1d095935b9c9af70123ed7b8..7c6e4b1e586c9bb1050f642e0b5d78e13538767f 100644 (file)
@@ -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,