ccm: Fixed a missing error flag assertion.

In ccm_calculate_first_block_if_ready when using ccm
tag_len==0 is invalid. When it fails, it will now also
assert the CCM_STATE__ERROR in the state machine's
context.

Signed-off-by: Minos Galanakis <[email protected]>
This commit is contained in:
Minos Galanakis
2026-03-12 11:09:31 +00:00
parent 8b50733a73
commit e8a2499d4e
+1
View File
@@ -177,6 +177,7 @@ static int ccm_calculate_first_block_if_ready(mbedtls_ccm_context *ctx)
ctx->plaintext_len = 0;
return 0;
} else {
ctx->state |= CCM_STATE__ERROR;
return MBEDTLS_ERR_CCM_BAD_INPUT;
}
}