summaryrefslogtreecommitdiffstats
path: root/test/aesgcmtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/aesgcmtest.c')
-rw-r--r--test/aesgcmtest.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/aesgcmtest.c b/test/aesgcmtest.c
index a13e9b856c..4a255d502c 100644
--- a/test/aesgcmtest.c
+++ b/test/aesgcmtest.c
@@ -54,6 +54,7 @@ static int do_encrypt(unsigned char *iv_gen, unsigned char *ct, int *ct_len,
&& TEST_true(EVP_EncryptUpdate(ctx, ct, ct_len, gcm_pt,
sizeof(gcm_pt)) > 0)
&& TEST_true(EVP_EncryptFinal_ex(ctx, outbuf, &outlen) > 0)
+ && TEST_int_eq(EVP_CIPHER_CTX_tag_length(ctx), 16)
&& TEST_true(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, 16,
tag) > 0)
&& TEST_true(iv_gen == NULL
@@ -75,6 +76,7 @@ static int do_decrypt(const unsigned char *iv, const unsigned char *ct,
&& TEST_true(EVP_DecryptInit_ex(ctx, EVP_aes_256_gcm(), NULL,
NULL, NULL) > 0)
&& TEST_true(EVP_DecryptInit_ex(ctx, NULL, NULL, gcm_key, iv) > 0)
+ && TEST_int_eq(EVP_CIPHER_CTX_tag_length(ctx), 16)
&& TEST_true(EVP_DecryptUpdate(ctx, NULL, &outlen, gcm_aad,
sizeof(gcm_aad)) > 0)
&& TEST_true(EVP_DecryptUpdate(ctx, pt, &ptlen, ct,