mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-24 13:25:37 +00:00
Make PSA headers more self-contained
Several files among include/psa/crypto_*.h are not meant to be included directly, and are not guaranteed to be valid if included directly. This makes it harder to perform some static analyses. So make these files more self-contained so that at least, if included on their own, there is no missing macro or type definition (excluding the deliberate use of forward declarations of structs and unions). Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
23b4096ecf
commit
9501bd7d6e
|
@ -42,6 +42,9 @@
|
|||
* of these types. */
|
||||
#include "crypto_types.h"
|
||||
#include "crypto_values.h"
|
||||
/* Include size definitions which are used to size some arrays in operation
|
||||
* structures. */
|
||||
#include <psa/crypto_sizes.h>
|
||||
|
||||
/** For encrypt-decrypt functions, whether the operation is an encryption
|
||||
* or a decryption. */
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "mbedtls/platform_util.h"
|
||||
|
||||
#include "crypto_types.h"
|
||||
#include "crypto_compat.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -184,7 +184,7 @@ typedef struct
|
|||
unsigned int info_set : 1;
|
||||
uint8_t output_block[PSA_HASH_MAX_SIZE];
|
||||
uint8_t prk[PSA_HASH_MAX_SIZE];
|
||||
psa_mac_operation_t hmac;
|
||||
struct psa_mac_operation_s hmac;
|
||||
} psa_hkdf_key_derivation_t;
|
||||
#endif /* MBEDTLS_PSA_BUILTIN_ALG_HKDF */
|
||||
|
||||
|
|
Loading…
Reference in a new issue