crypto: ccp - Ignore tag length when decrypting GCM ciphertext
Changes
1 files changed · +1 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| drivers/crypto/ccp/ccp-ops.c | modified | +1 | −2 | View file |
drivers/crypto/ccp/ccp-ops.c
View filediff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
index ef723e2..76e1b4d 100644
--- a/drivers/crypto/ccp/ccp-ops.c
+++ b/drivers/crypto/ccp/ccp-ops.c
@@ -782,8 +782,7 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q,
while (src.sg_wa.bytes_left) {
ccp_prepare_data(&src, &dst, &op, AES_BLOCK_SIZE, true);
if (!src.sg_wa.bytes_left) {
- unsigned int nbytes = aes->src_len
- % AES_BLOCK_SIZE;
+ unsigned int nbytes = ilen % AES_BLOCK_SIZE;
if (nbytes) {
op.eom = 1;