Make legacy_or_psa.h public.

As a public header, it should no longer include common.h, just use
build_info.h which is what we actually need anyway.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2022-09-15 11:29:35 +02:00
parent c42c7e660e
commit 07018f97d2
25 changed files with 25 additions and 25 deletions

View file

@ -96,7 +96,7 @@
#ifndef MBEDTLS_OR_PSA_HELPERS_H #ifndef MBEDTLS_OR_PSA_HELPERS_H
#define MBEDTLS_OR_PSA_HELPERS_H #define MBEDTLS_OR_PSA_HELPERS_H
#include "common.h" #include "mbedtls/build_info.h"
#if defined(MBEDTLS_PSA_CRYPTO_C) #if defined(MBEDTLS_PSA_CRYPTO_C)
#include "psa/crypto.h" #include "psa/crypto.h"
#endif /* MBEDTLS_PSA_CRYPTO_C */ #endif /* MBEDTLS_PSA_CRYPTO_C */

View file

@ -21,7 +21,7 @@
*/ */
#include "hash_info.h" #include "hash_info.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#include "mbedtls/error.h" #include "mbedtls/error.h"
typedef struct typedef struct

View file

@ -27,7 +27,7 @@
#include "mbedtls/rsa.h" #include "mbedtls/rsa.h"
#include "mbedtls/error.h" #include "mbedtls/error.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file

@ -45,7 +45,7 @@
#include "psa/crypto.h" #include "psa/crypto.h"
#endif #endif
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#if defined(MBEDTLS_HAS_ALG_MD5_VIA_MD_OR_PSA_BASED_ON_USE_PSA) && \ #if defined(MBEDTLS_HAS_ALG_MD5_VIA_MD_OR_PSA_BASED_ON_USE_PSA) && \
defined(MBEDTLS_CIPHER_MODE_CBC) && \ defined(MBEDTLS_CIPHER_MODE_CBC) && \

View file

@ -33,7 +33,7 @@
#include "mbedtls/ssl.h" #include "mbedtls/ssl.h"
#include "ssl_misc.h" #include "ssl_misc.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#include <string.h> #include <string.h>

View file

@ -38,7 +38,7 @@
#include "mbedtls/platform_util.h" #include "mbedtls/platform_util.h"
#include "mbedtls/constant_time.h" #include "mbedtls/constant_time.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#include <string.h> #include <string.h>

View file

@ -32,7 +32,7 @@
#include "mbedtls/psa_util.h" #include "mbedtls/psa_util.h"
#include "hash_info.h" #include "hash_info.h"
#endif #endif
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#if defined(MBEDTLS_MD5_C) #if defined(MBEDTLS_MD5_C)
#include "mbedtls/md5.h" #include "mbedtls/md5.h"

View file

@ -54,7 +54,7 @@
#include "mbedtls/psa_util.h" #include "mbedtls/psa_util.h"
#include "psa/crypto.h" #include "psa/crypto.h"
#endif #endif
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#if defined(MBEDTLS_X509_CRT_PARSE_C) #if defined(MBEDTLS_X509_CRT_PARSE_C)
#include "mbedtls/oid.h" #include "mbedtls/oid.h"

View file

@ -62,7 +62,7 @@
#include <time.h> #include <time.h>
#endif #endif
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#define CHECK(code) if( ( ret = ( code ) ) != 0 ){ return( ret ); } #define CHECK(code) if( ( ret = ( code ) ) != 0 ){ return( ret ); }
#define CHECK_RANGE(min, max, val) \ #define CHECK_RANGE(min, max, val) \

View file

@ -46,7 +46,7 @@
#endif /* MBEDTLS_USE_PSA_CRYPTO */ #endif /* MBEDTLS_USE_PSA_CRYPTO */
#include "hash_info.h" #include "hash_info.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
void mbedtls_x509write_crt_init( mbedtls_x509write_cert *ctx ) void mbedtls_x509write_crt_init( mbedtls_x509write_cert *ctx )
{ {

View file

@ -23,7 +23,7 @@
#include "mbedtls/build_info.h" #include "mbedtls/build_info.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
/* /*
* Test CA Certificates * Test CA Certificates

View file

@ -1,7 +1,7 @@
/* BEGIN_HEADER */ /* BEGIN_HEADER */
#include "mbedtls/ecdsa.h" #include "mbedtls/ecdsa.h"
#include "hash_info.h" #include "hash_info.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#if ( defined(MBEDTLS_ECDSA_DETERMINISTIC) && defined(MBEDTLS_SHA256_C) ) || \ #if ( defined(MBEDTLS_ECDSA_DETERMINISTIC) && defined(MBEDTLS_SHA256_C) ) || \
( !defined(MBEDTLS_ECDSA_DETERMINISTIC) && defined(MBEDTLS_HAS_ALG_SHA_256_VIA_LOWLEVEL_OR_PSA) ) ( !defined(MBEDTLS_ECDSA_DETERMINISTIC) && defined(MBEDTLS_HAS_ALG_SHA_256_VIA_LOWLEVEL_OR_PSA) )
#define MBEDTLS_HAS_ALG_SHA_256_VIA_MD_IF_DETERMINISTIC #define MBEDTLS_HAS_ALG_SHA_256_VIA_MD_IF_DETERMINISTIC

View file

@ -1,6 +1,6 @@
/* BEGIN_HEADER */ /* BEGIN_HEADER */
#include "mbedtls/ecjpake.h" #include "mbedtls/ecjpake.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) && defined(MBEDTLS_HAS_ALG_SHA_256_VIA_MD_OR_PSA) #if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) && defined(MBEDTLS_HAS_ALG_SHA_256_VIA_MD_OR_PSA)
static const unsigned char ecjpake_test_x1[] = { static const unsigned char ecjpake_test_x1[] = {

View file

@ -3,7 +3,7 @@
#include "mbedtls/asn1.h" #include "mbedtls/asn1.h"
#include "mbedtls/asn1write.h" #include "mbedtls/asn1write.h"
#include "string.h" #include "string.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
/* END_HEADER */ /* END_HEADER */
/* BEGIN_DEPENDENCIES /* BEGIN_DEPENDENCIES

View file

@ -3,7 +3,7 @@
#include "mbedtls/pem.h" #include "mbedtls/pem.h"
#include "mbedtls/des.h" #include "mbedtls/des.h"
#include "mbedtls/aes.h" #include "mbedtls/aes.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
/* END_HEADER */ /* END_HEADER */

View file

@ -8,7 +8,7 @@
#include "mbedtls/rsa.h" #include "mbedtls/rsa.h"
#include "hash_info.h" #include "hash_info.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#include <limits.h> #include <limits.h>
#include <stdint.h> #include <stdint.h>

View file

@ -2,7 +2,7 @@
#include "mbedtls/pkcs12.h" #include "mbedtls/pkcs12.h"
#include "common.h" #include "common.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
typedef enum typedef enum
{ {

View file

@ -2,7 +2,7 @@
#include "mbedtls/rsa.h" #include "mbedtls/rsa.h"
#include "mbedtls/md.h" #include "mbedtls/md.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
/* END_HEADER */ /* END_HEADER */
/* BEGIN_DEPENDENCIES /* BEGIN_DEPENDENCIES

View file

@ -1,6 +1,6 @@
/* BEGIN_HEADER */ /* BEGIN_HEADER */
#include "mbedtls/rsa.h" #include "mbedtls/rsa.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
/* END_HEADER */ /* END_HEADER */
/* BEGIN_DEPENDENCIES /* BEGIN_DEPENDENCIES

View file

@ -1,6 +1,6 @@
/* BEGIN_HEADER */ /* BEGIN_HEADER */
#include "mbedtls/pkcs5.h" #include "mbedtls/pkcs5.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
/* END_HEADER */ /* END_HEADER */
/* BEGIN_DEPENDENCIES /* BEGIN_DEPENDENCIES

View file

@ -2,7 +2,7 @@
#include "mbedtls/pk.h" #include "mbedtls/pk.h"
#include "mbedtls/pem.h" #include "mbedtls/pem.h"
#include "mbedtls/oid.h" #include "mbedtls/oid.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
/* END_HEADER */ /* END_HEADER */
/* BEGIN_DEPENDENCIES /* BEGIN_DEPENDENCIES

View file

@ -2,7 +2,7 @@
#include "mbedtls/rsa.h" #include "mbedtls/rsa.h"
#include "rsa_alt_helpers.h" #include "rsa_alt_helpers.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
/* END_HEADER */ /* END_HEADER */
/* BEGIN_DEPENDENCIES /* BEGIN_DEPENDENCIES

View file

@ -11,7 +11,7 @@
#include "mbedtls/ssl_cache.h" #include "mbedtls/ssl_cache.h"
#endif #endif
#include <legacy_or_psa.h> #include <mbedtls/legacy_or_psa.h>
#include "hash_info.h" #include "hash_info.h"
#include <constant_time_internal.h> #include <constant_time_internal.h>

View file

@ -10,7 +10,7 @@
#include "mbedtls/error.h" #include "mbedtls/error.h"
#include "string.h" #include "string.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.h"
#if MBEDTLS_X509_MAX_INTERMEDIATE_CA > 19 #if MBEDTLS_X509_MAX_INTERMEDIATE_CA > 19
#error "The value of MBEDTLS_X509_MAX_INTERMEDIATE_C is larger \ #error "The value of MBEDTLS_X509_MAX_INTERMEDIATE_C is larger \

View file

@ -7,7 +7,7 @@
#include "mbedtls/rsa.h" #include "mbedtls/rsa.h"
#include "hash_info.h" #include "hash_info.h"
#include "legacy_or_psa.h" #include "mbedtls/legacy_or_psa.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,