From fe0f09e35fa1389a382c5069a98c5347e21cedd6 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Fri, 4 Oct 2024 13:46:37 +0200 Subject: [PATCH] Documentation: fix some nits Signed-off-by: Valerio Setti --- include/mbedtls/mbedtls_config.h | 2 +- library/psa_crypto_core.h | 4 ++-- tests/include/test/psa_crypto_helpers.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h index 97994977f7..ebc9276d20 100644 --- a/include/mbedtls/mbedtls_config.h +++ b/include/mbedtls/mbedtls_config.h @@ -3280,7 +3280,7 @@ * #MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE. * * \note This feature comes with a (potentially) higher RAM usage since: - * - All the key slots are allocated no matter if they are used of not. + * - All the key slots are allocated no matter if they are used or not. * - Each key buffer's length is #MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE bytes. * * Requires: MBEDTLS_PSA_CRYPTO_C diff --git a/library/psa_crypto_core.h b/library/psa_crypto_core.h index f2d849876c..df0ee501ab 100644 --- a/library/psa_crypto_core.h +++ b/library/psa_crypto_core.h @@ -157,9 +157,9 @@ typedef struct { struct key_data { #if defined(MBEDTLS_PSA_STATIC_KEY_SLOTS) uint8_t data[MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE]; -#else /* MBEDTLS_PSA_STATIC_KEY_SLOTS */ +#else uint8_t *data; -#endif /* MBEDTLS_PSA_STATIC_KEY_SLOTS */ +#endif size_t bytes; } key; } psa_key_slot_t; diff --git a/tests/include/test/psa_crypto_helpers.h b/tests/include/test/psa_crypto_helpers.h index 723fc32f85..195f871d43 100644 --- a/tests/include/test/psa_crypto_helpers.h +++ b/tests/include/test/psa_crypto_helpers.h @@ -491,7 +491,7 @@ uint64_t mbedtls_test_parse_binary_string(data_t *bin_string); #endif /* Helper macro for the PK module to check whether MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE - * is large enough to contain 4096 bits RSA key pairs. Of course this check is only + * is large enough to contain 4096-bit RSA key pairs. Of course this check is only * necessary if PK relies on PSA (i.e. MBEDTLS_USE_PSA_CRYPTO) to store and manage * the key. */ #if defined(MBEDTLS_USE_PSA_CRYPTO)