From 20771849534341b709aef734a7f00696595fd4ee Mon Sep 17 00:00:00 2001 From: Marco Oliverio Date: Mon, 31 Jan 2022 16:38:13 +0100 Subject: [PATCH] psa: add compile-time error if builded with crypto cb --- wolfssl/wolfcrypt/port/psa/psa.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wolfssl/wolfcrypt/port/psa/psa.h b/wolfssl/wolfcrypt/port/psa/psa.h index 6c19a7887..e4683b28b 100644 --- a/wolfssl/wolfcrypt/port/psa/psa.h +++ b/wolfssl/wolfcrypt/port/psa/psa.h @@ -44,6 +44,13 @@ #include +/* PSA implementation takes over the Sha struct and Sha functions implementation + completely. Devoiding the struct of the DevId field and hooks to make + crypto_cb work. */ +#if !defined(WOLFSSL_PSA_NO_HASH) && defined(WOLF_CRYPTO_CB) +#error "WOLFSSL PSA is not supported with WOLF_CRYPTO_CB" +#endif + #if defined(WOLFSSL_HAVE_PSA) #include