Create psa_util_internal.h
Most functions in psa_util.h are going to end up there (except those that can be static in one file), but I wanted to have separate commits for file creation and moving code around, so for now the new file's pretty empty but that will change in the next few commits. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
836aed7cf8
commit
2be8c63af7
27 changed files with 62 additions and 30 deletions
|
@ -3,12 +3,12 @@
|
|||
* \brief PSA crypto random generator implementation abstraction.
|
||||
*
|
||||
* The definitions here need to be consistent with the declarations
|
||||
* in include/mbedtls/psa_util.h. This file contains some redundant
|
||||
* in include/psa_util_internal.h. This file contains some redundant
|
||||
* declarations to increase the chance that a compiler will detect
|
||||
* inconsistencies if one file is changed without updating the other,
|
||||
* but not all potential inconsistencies can be enforced, so make sure
|
||||
* to check the public declarations and contracts in
|
||||
* include/mbedtls/psa_util.h if you modify this file.
|
||||
* include/psa_util_internal.h if you modify this file.
|
||||
*/
|
||||
/*
|
||||
* Copyright The Mbed TLS Contributors
|
||||
|
@ -30,7 +30,7 @@
|
|||
#ifndef PSA_CRYPTO_RANDOM_IMPL_H
|
||||
#define PSA_CRYPTO_RANDOM_IMPL_H
|
||||
|
||||
#include <mbedtls/psa_util.h>
|
||||
#include <psa_util_internal.h>
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
|
||||
|
||||
|
@ -123,7 +123,7 @@ typedef struct {
|
|||
mbedtls_psa_drbg_context_t drbg;
|
||||
} mbedtls_psa_random_context_t;
|
||||
|
||||
/* Defined in include/mbedtls/psa_util.h so that it's visible to
|
||||
/* Defined in include/psa_util_internal.h so that it's visible to
|
||||
* application code. The declaration here is redundant, but included
|
||||
* as a safety net to make it more likely that a future change that
|
||||
* accidentally causes the implementation to diverge from the interface
|
||||
|
@ -154,7 +154,7 @@ static mbedtls_f_rng_t *const mbedtls_psa_get_random;
|
|||
/* psa_crypto.c sets this variable to a pointer to the DRBG state in the
|
||||
* global PSA crypto state. */
|
||||
/* The type `mbedtls_psa_drbg_context_t` is defined in
|
||||
* include/mbedtls/psa_util.h so that `mbedtls_psa_random_state` can be
|
||||
* include/psa_util_internal.h so that `mbedtls_psa_random_state` can be
|
||||
* declared there and be visible to application code. */
|
||||
extern mbedtls_psa_drbg_context_t *const mbedtls_psa_random_state;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue