Skip to content

Commit f09a0b3

Browse files
authored
Merge pull request #130 from haydenroche5/aes_gcm_bench_fix
Fix issue with AES-GCM decryption benchmarking.
2 parents 18e0c09 + 5397921 commit f09a0b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bench.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,9 @@ static int aesgcm_dec_bench(const char *alg, EVP_CIPHER_CTX *ctx, size_t len)
396396
err |= EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, sizeof(tag),
397397
tag) != 1;
398398
err |= EVP_DecryptUpdate(ctx, NULL, &outLen, aad, sizeof(aad)) != 1;
399-
err |= EVP_DecryptUpdate(ctx, data, &outLen, data, (int)len) != 1;
400-
EVP_DecryptFinal_ex(ctx, data + outLen, &outLen);
401399
/* Ignore error as the tag doesn't match the data. */
400+
EVP_DecryptUpdate(ctx, data, &outLen, data, (int)len);
401+
EVP_DecryptFinal_ex(ctx, data + outLen, &outLen);
402402
}
403403
cnt += i;
404404
}

0 commit comments

Comments
 (0)