From 2e9d65f928be9287e5e2c5a443beaa845982b8bb Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 31 Aug 2021 23:05:19 +0200 Subject: [PATCH] Note that custom info structures are not supported This was already documented for mbedtls_md_info_t. Also document it for mbedtls_pk_info_t (where it's fairly obvious since the structure is not defined in a public header) and for mbedtls_cipher_info_t (where it's not obvious since the structure is defined in a public header). Signed-off-by: Gilles Peskine --- include/mbedtls/cipher.h | 7 +++++++ include/mbedtls/pk.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/include/mbedtls/cipher.h b/include/mbedtls/cipher.h index 7921f4d85f..b4630f63cd 100644 --- a/include/mbedtls/cipher.h +++ b/include/mbedtls/cipher.h @@ -258,6 +258,13 @@ typedef struct mbedtls_cmac_context_t mbedtls_cmac_context_t; /** * Cipher information. Allows calling cipher functions * in a generic way. + * + * \note The library does not support custom cipher info structures, + * only built-in structures returned by the functions + * mbedtls_cipher_info_from_string(), + * mbedtls_cipher_info_from_type(), + * mbedtls_cipher_info_from_values(), + * mbedtls_cipher_info_from_psa(). */ typedef struct mbedtls_cipher_info_t { diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h index ded52225f2..5f9f29ff6d 100644 --- a/include/mbedtls/pk.h +++ b/include/mbedtls/pk.h @@ -186,6 +186,10 @@ typedef struct mbedtls_pk_debug_item /** * \brief Public key information and operations + * + * \note The library does not support custom pk info structures, + * only built-in structures returned by + * mbedtls_cipher_info_from_type(). */ typedef struct mbedtls_pk_info_t mbedtls_pk_info_t;