library/tests: replace md_psa.h with psa_util.h as include file for MD conversion

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti 2024-01-02 13:26:40 +01:00
parent 45c3cae8a5
commit 384fbde49a
20 changed files with 20 additions and 19 deletions

View file

@ -31,7 +31,7 @@
#if defined(MBEDTLS_USE_PSA_CRYPTO) #if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "psa_util_internal.h" #include "psa_util_internal.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#endif #endif
#include <limits.h> #include <limits.h>

View file

@ -13,7 +13,7 @@
#include "pk_wrap.h" #include "pk_wrap.h"
#include "pk_internal.h" #include "pk_internal.h"
#include "mbedtls/error.h" #include "mbedtls/error.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
/* Even if RSA not activated, for the sake of RSA-alt */ /* Even if RSA not activated, for the sake of RSA-alt */
#include "mbedtls/rsa.h" #include "mbedtls/rsa.h"

View file

@ -70,7 +70,7 @@
#include "mbedtls/sha1.h" #include "mbedtls/sha1.h"
#include "mbedtls/sha256.h" #include "mbedtls/sha256.h"
#include "mbedtls/sha512.h" #include "mbedtls/sha512.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#if defined(MBEDTLS_PSA_BUILTIN_ALG_HKDF) || \ #if defined(MBEDTLS_PSA_BUILTIN_ALG_HKDF) || \
defined(MBEDTLS_PSA_BUILTIN_ALG_HKDF_EXTRACT) || \ defined(MBEDTLS_PSA_BUILTIN_ALG_HKDF_EXTRACT) || \

View file

@ -14,7 +14,7 @@
#include "psa_crypto_core.h" #include "psa_crypto_core.h"
#include "psa_crypto_ecp.h" #include "psa_crypto_ecp.h"
#include "psa_crypto_random_impl.h" #include "psa_crypto_random_impl.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View file

@ -16,7 +16,7 @@
#include "psa_crypto_random_impl.h" #include "psa_crypto_random_impl.h"
#include "psa_crypto_rsa.h" #include "psa_crypto_rsa.h"
#include "psa_crypto_hash.h" #include "psa_crypto_hash.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View file

@ -17,7 +17,7 @@
#include "mbedtls/ssl.h" #include "mbedtls/ssl.h"
#include "ssl_misc.h" #include "ssl_misc.h"
#if defined(MBEDTLS_USE_PSA_CRYPTO) #if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "md_psa.h" #include "mbedtls/psa_util.h"
#endif #endif
#include <string.h> #include <string.h>

View file

@ -24,7 +24,7 @@
#include <string.h> #include <string.h>
#if defined(MBEDTLS_USE_PSA_CRYPTO) #if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "md_psa.h" #include "mbedtls/psa_util.h"
/* Define a local translating function to save code size by not using too many /* Define a local translating function to save code size by not using too many
* arguments in each translating place. */ * arguments in each translating place. */
static int local_err_translation(psa_status_t status) static int local_err_translation(psa_status_t status)

View file

@ -29,6 +29,7 @@
#include <string.h> #include <string.h>
#if defined(MBEDTLS_USE_PSA_CRYPTO) #if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "mbedtls/psa_util.h"
#include "md_psa.h" #include "md_psa.h"
#include "psa_util_internal.h" #include "psa_util_internal.h"
#include "psa/crypto.h" #include "psa/crypto.h"

View file

@ -19,7 +19,7 @@
#include "ssl_client.h" #include "ssl_client.h"
#include "ssl_tls13_keys.h" #include "ssl_tls13_keys.h"
#include "ssl_debug_helpers.h" #include "ssl_debug_helpers.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_EPHEMERAL_ENABLED) #if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_EPHEMERAL_ENABLED)
/* Define a local translating function to save code size by not using too many /* Define a local translating function to save code size by not using too many

View file

@ -17,7 +17,7 @@
#include "mbedtls/platform.h" #include "mbedtls/platform.h"
#include "mbedtls/constant_time.h" #include "mbedtls/constant_time.h"
#include "psa/crypto.h" #include "psa/crypto.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#include "ssl_misc.h" #include "ssl_misc.h"
#include "ssl_tls13_invasive.h" #include "ssl_tls13_invasive.h"

View file

@ -22,7 +22,7 @@
#include "ssl_tls13_invasive.h" #include "ssl_tls13_invasive.h"
#include "psa/crypto.h" #include "psa/crypto.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
/* Define a local translating function to save code size by not using too many /* Define a local translating function to save code size by not using too many
* arguments in each translating place. */ * arguments in each translating place. */

View file

@ -14,7 +14,7 @@
#include "mbedtls/platform.h" #include "mbedtls/platform.h"
#include "mbedtls/constant_time.h" #include "mbedtls/constant_time.h"
#include "mbedtls/oid.h" #include "mbedtls/oid.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#include "ssl_misc.h" #include "ssl_misc.h"
#include "ssl_tls13_keys.h" #include "ssl_tls13_keys.h"

View file

@ -35,7 +35,7 @@
#if defined(MBEDTLS_USE_PSA_CRYPTO) #if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "psa/crypto.h" #include "psa/crypto.h"
#include "psa_util_internal.h" #include "psa_util_internal.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#endif /* MBEDTLS_USE_PSA_CRYPTO */ #endif /* MBEDTLS_USE_PSA_CRYPTO */
#include "pk_internal.h" #include "pk_internal.h"

View file

@ -33,7 +33,7 @@
#if defined(MBEDTLS_USE_PSA_CRYPTO) #if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "psa/crypto.h" #include "psa/crypto.h"
#include "psa_util_internal.h" #include "psa_util_internal.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#endif /* MBEDTLS_USE_PSA_CRYPTO */ #endif /* MBEDTLS_USE_PSA_CRYPTO */
void mbedtls_x509write_crt_init(mbedtls_x509write_cert *ctx) void mbedtls_x509write_crt_init(mbedtls_x509write_cert *ctx)

View file

@ -24,7 +24,7 @@
#if defined(MBEDTLS_USE_PSA_CRYPTO) #if defined(MBEDTLS_USE_PSA_CRYPTO)
#include "psa/crypto.h" #include "psa/crypto.h"
#include "psa_util_internal.h" #include "psa_util_internal.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#endif /* MBEDTLS_USE_PSA_CRYPTO */ #endif /* MBEDTLS_USE_PSA_CRYPTO */
#include <string.h> #include <string.h>

View file

@ -9,7 +9,7 @@
*/ */
#include <test/ssl_helpers.h> #include <test/ssl_helpers.h>
#include "md_psa.h" #include "mbedtls/psa_util.h"
#if defined(MBEDTLS_SSL_TLS_C) #if defined(MBEDTLS_SSL_TLS_C)
#if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED) #if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED)

View file

@ -3,7 +3,7 @@
#include <mbedtls/constant_time.h> #include <mbedtls/constant_time.h>
#include <mbedtls/md.h> #include <mbedtls/md.h>
#include <constant_time_internal.h> #include <constant_time_internal.h>
#include "md_psa.h" #include "mbedtls/psa_util.h"
#include <ssl_misc.h> #include <ssl_misc.h>
#include <test/constant_flow.h> #include <test/constant_flow.h>

View file

@ -1,6 +1,6 @@
/* BEGIN_HEADER */ /* BEGIN_HEADER */
#include "mbedtls/md.h" #include "mbedtls/md.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#include "mbedtls/oid.h" #include "mbedtls/oid.h"
#include "mbedtls/asn1.h" #include "mbedtls/asn1.h"

View file

@ -16,7 +16,7 @@
* but the test code generator requires test case data to be valid C code * but the test code generator requires test case data to be valid C code
* unconditionally (https://github.com/Mbed-TLS/mbedtls/issues/2023). */ * unconditionally (https://github.com/Mbed-TLS/mbedtls/issues/2023). */
#include "psa/crypto.h" #include "psa/crypto.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
/* Used for properly sizing the key buffer in pk_genkey_ec() */ /* Used for properly sizing the key buffer in pk_genkey_ec() */
#include "psa_util_internal.h" #include "psa_util_internal.h"

View file

@ -7,7 +7,7 @@
#include "mbedtls/rsa.h" #include "mbedtls/rsa.h"
#include "mbedtls/asn1write.h" #include "mbedtls/asn1write.h"
#include "mbedtls/pk.h" #include "mbedtls/pk.h"
#include "md_psa.h" #include "mbedtls/psa_util.h"
#if defined(MBEDTLS_RSA_C) #if defined(MBEDTLS_RSA_C)
int mbedtls_rsa_decrypt_func(void *ctx, size_t *olen, int mbedtls_rsa_decrypt_func(void *ctx, size_t *olen,