From 2fe5db87d5702a4f34f6fd28acaa0f5961584e93 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Thu, 22 Jul 2021 18:10:43 +0100 Subject: [PATCH] Fix passing wrong tag size to GCM finish Signed-off-by: Paul Elliott --- library/psa_crypto_aead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/psa_crypto_aead.c b/library/psa_crypto_aead.c index 5310702c6..6af25ec78 100644 --- a/library/psa_crypto_aead.c +++ b/library/psa_crypto_aead.c @@ -628,7 +628,7 @@ psa_status_t mbedtls_psa_aead_finish( status = mbedtls_to_psa_error( mbedtls_gcm_finish( &operation->ctx.gcm, ciphertext, ciphertext_size, - tag, tag_size ) ); + tag, operation->tag_length ) ); else #endif /* MBEDTLS_PSA_BUILTIN_ALG_GCM */ #if defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305)