From b1777312dad14b7b87f458b757c34fa0fc6470f7 Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Thu, 4 Mar 2021 15:22:38 +0100 Subject: [PATCH] Make the driver context union a defined type Signed-off-by: Steven Cooreman --- include/psa/crypto_struct.h | 2 +- library/psa_crypto_driver_wrappers_contexts.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/psa/crypto_struct.h b/include/psa/crypto_struct.h index 5d03d110d..f22ed50c6 100644 --- a/include/psa/crypto_struct.h +++ b/include/psa/crypto_struct.h @@ -91,7 +91,7 @@ struct psa_hash_operation_s * ID value zero means the context is not valid or not assigned to * any driver (i.e. none of the driver contexts are active). */ unsigned int id; - union psa_driver_hash_context_u ctx; + psa_driver_hash_context_t ctx; }; #define PSA_HASH_OPERATION_INIT {0, {0}} diff --git a/library/psa_crypto_driver_wrappers_contexts.h b/library/psa_crypto_driver_wrappers_contexts.h index db4153c4d..8cc21a287 100644 --- a/library/psa_crypto_driver_wrappers_contexts.h +++ b/library/psa_crypto_driver_wrappers_contexts.h @@ -42,13 +42,13 @@ * are formatted as `'drivername'_ctx`. This allows for procedural generation * of both this file and the content of psa_crypto_driver_wrappers.c */ -union psa_driver_hash_context_u { +typedef union { unsigned dummy; /* Make sure this structure is always non-empty */ mbedtls_psa_hash_operation_t mbedtls_ctx; #if defined(PSA_CRYPTO_DRIVER_TEST) test_transparent_hash_operation_t test_ctx; #endif -}; +} psa_driver_hash_context_t; #endif /* PSA_CRYPTO_DRIVER_WRAPPERS_CONTEXTS_H */ /* End of automatically generated file. */