From bdea4d4d8b649ecc1415813fe4151b287c201235 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Fri, 19 Nov 2021 18:01:40 +0100 Subject: [PATCH] psa: Fix and improve comments Signed-off-by: Ronald Cron --- library/psa_crypto_hash.c | 2 -- library/psa_crypto_mac.c | 2 -- tests/include/test/drivers/config_test_driver.h | 14 ++++++-------- .../drivers/crypto_config_test_driver_extension.h | 8 +++++--- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/library/psa_crypto_hash.c b/library/psa_crypto_hash.c index 9c50ca8db..337e557b0 100644 --- a/library/psa_crypto_hash.c +++ b/library/psa_crypto_hash.c @@ -82,8 +82,6 @@ const mbedtls_md_info_t *mbedtls_md_info_from_psa( psa_algorithm_t alg ) * defined(MBEDTLS_PSA_BUILTIN_ALG_RSA_PSS) || * defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA) */ -/* Implement the PSA driver hash interface on top of mbed TLS if either the - * software driver or the test driver requires it. */ #if defined(MBEDTLS_PSA_BUILTIN_HASH) psa_status_t mbedtls_psa_hash_abort( mbedtls_psa_hash_operation_t *operation ) diff --git a/library/psa_crypto_mac.c b/library/psa_crypto_mac.c index 5e78d65a6..dcf065a67 100644 --- a/library/psa_crypto_mac.c +++ b/library/psa_crypto_mac.c @@ -189,8 +189,6 @@ exit: } #endif /* MBEDTLS_PSA_BUILTIN_ALG_CMAC */ -/* Implement the PSA driver MAC interface on top of mbed TLS if either the - * software driver or the test driver requires it. */ #if defined(MBEDTLS_PSA_BUILTIN_ALG_HMAC) || \ defined(MBEDTLS_PSA_BUILTIN_ALG_CMAC) diff --git a/tests/include/test/drivers/config_test_driver.h b/tests/include/test/drivers/config_test_driver.h index 0b5a6499a..97be72d2f 100644 --- a/tests/include/test/drivers/config_test_driver.h +++ b/tests/include/test/drivers/config_test_driver.h @@ -1,11 +1,9 @@ -/** - * \file config.h - * - * \brief Configuration options (set of defines) - * - * This set of compile-time options may be used to enable - * or disable features selectively, and reduce the global - * memory footprint. +/* + * Mbed TLS configuration for PSA test driver libraries. It includes: + * . the minimum set of modules needed by the PSA core. + * . the Mbed TLS configuration options that may need to be additionally + * enabled for the purpose of a specific test. + * . the PSA configuration file for the Mbed TLS library and its test drivers. */ /* * Copyright The Mbed TLS Contributors diff --git a/tests/include/test/drivers/crypto_config_test_driver_extension.h b/tests/include/test/drivers/crypto_config_test_driver_extension.h index f4f95dcfc..f5be7b385 100644 --- a/tests/include/test/drivers/crypto_config_test_driver_extension.h +++ b/tests/include/test/drivers/crypto_config_test_driver_extension.h @@ -1,7 +1,9 @@ /** - * \file psa/crypto_config.h - * \brief PSA crypto configuration options (set of defines) - * + * This file is intended to be used to build PSA test driver libraries. It is + * intended to be appended by the test build system to the crypto_config.h file + * of the Mbed TLS library the test library will be linked to. It mirrors the + * PSA_ACCEL_* macros defining the cryptographic operations the test library + * supports. */ #if defined(PSA_WANT_ALG_CBC_NO_PADDING)