From a3a8abadff79922668ffcbc649a67c4643f96f4b Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Fri, 3 Feb 2023 14:49:37 +0000 Subject: [PATCH] Fix operation initialisers if no algorithms defined Signed-off-by: Paul Elliott --- include/psa/crypto_builtin_composites.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/psa/crypto_builtin_composites.h b/include/psa/crypto_builtin_composites.h index ac065c163..800024281 100644 --- a/include/psa/crypto_builtin_composites.h +++ b/include/psa/crypto_builtin_composites.h @@ -135,8 +135,14 @@ typedef struct { * MBEDTLS_ECP_RESTARTABLE */ } mbedtls_psa_sign_hash_interruptible_operation_t; +#if (defined(MBEDTLS_PSA_BUILTIN_ALG_ECDSA) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA)) && \ + defined(MBEDTLS_ECP_RESTARTABLE) #define MBEDTLS_PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT { { 0 }, { 0 }, 0, 0, 0, 0, 0, { 0 }, \ { 0 } } +#else +#define MBEDTLS_PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT { 0 } +#endif /* Context structure for the Mbed TLS interruptible verify hash * implementation.*/ @@ -165,8 +171,14 @@ typedef struct { } mbedtls_psa_verify_hash_interruptible_operation_t; +#if (defined(MBEDTLS_PSA_BUILTIN_ALG_ECDSA) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA)) && \ + defined(MBEDTLS_ECP_RESTARTABLE) #define MBEDTLS_VERIFY_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT { { 0 }, { 0 }, 0, 0, 0, { 0 }, \ { 0 } } +#else +#define MBEDTLS_VERIFY_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT { 0 } +#endif