From 86e6c9f8605138befbfa07e1d7deb30a678b705d Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Thu, 27 May 2021 09:30:59 +0200 Subject: [PATCH] Improve expected context state for some APIs Signed-off-by: Ronald Cron --- include/mbedtls/ccm.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/ccm.h b/include/mbedtls/ccm.h index 4cfb1e85c..eb0cbb2ca 100644 --- a/include/mbedtls/ccm.h +++ b/include/mbedtls/ccm.h @@ -400,7 +400,8 @@ int mbedtls_ccm_update_ad( mbedtls_ccm_context *ctx, * the input buffer. If the buffers overlap, the output buffer * must trail at least 8 Bytes behind the input buffer. * - * \param ctx The CCM context. This must be initialized. + * \param ctx The CCM context. This must have been started with + * mbedtls_ccm_starts(). * \param input The buffer holding the input data. If \p input_len * is greater than zero, this must be a readable buffer * of at least \p input_len bytes. @@ -435,7 +436,8 @@ int mbedtls_ccm_update( mbedtls_ccm_context *ctx, * * \note This function is not implemented in Mbed TLS yet. * - * \param ctx The CCM context. This must be initialized. + * \param ctx The CCM context. This must have been started with + * mbedtls_ccm_starts(). * \param tag The buffer for holding the tag. If \p tag_len is greater * than zero, this must be a writable buffer of at least \p * tag_len Bytes.