From 08fd33a875b50aa6e5297f26915c20a3ea265d86 Mon Sep 17 00:00:00 2001 From: Waleed Elmelegy Date: Fri, 22 Sep 2023 14:45:25 +0100 Subject: [PATCH] Add warning to mbedtls_cipher_setup() about setting padding mode Signed-off-by: Waleed Elmelegy --- include/mbedtls/cipher.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/mbedtls/cipher.h b/include/mbedtls/cipher.h index 56fc2d828..b1149f6fa 100644 --- a/include/mbedtls/cipher.h +++ b/include/mbedtls/cipher.h @@ -449,6 +449,10 @@ void mbedtls_cipher_free(mbedtls_cipher_context_t *ctx); * \brief This function initializes a cipher context for * use with the given cipher primitive. * + * \warning The behavior if mbedtls_cipher_set_padding_mode() + * is not called after calling this function is not + * guaranteed. + * * \param ctx The context to initialize. This must be initialized. * \param cipher_info The cipher to use. *