mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 14:15:39 +00:00
Add a check for MBEDTLS_PK_WRITE_C with USE_PSA_CRYPTO to check-config.h
Also force MBEDTLS_PK_WRITE_C in reduced configs using MBEDTLS_USE_PSA_CRYPTO, MBEDTLS_PK_C and MBEDTLS_ECDSA_C. Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
19e83fa3a5
commit
1faa2a3c6e
|
@ -114,6 +114,11 @@
|
|||
//#define MBEDTLS_USE_PSA_CRYPTO
|
||||
//#define MBEDTLS_PSA_CRYPTO_C
|
||||
|
||||
/* With USE_PSA_CRYPTO, some PK operations also need PK_WRITE */
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#define MBEDTLS_PK_WRITE_C
|
||||
#endif
|
||||
|
||||
#include "mbedtls/check_config.h"
|
||||
|
||||
#endif /* MBEDTLS_CONFIG_H */
|
||||
|
|
|
@ -623,6 +623,12 @@
|
|||
#error "MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER defined, but it cannot coexist with MBEDTLS_USE_PSA_CRYPTO."
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PK_C) && defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
||||
!defined(MBEDTLS_PK_WRITE_C) && defined(MBEDTLS_ECDSA_C)
|
||||
#error "MBEDTLS_PK_C in configuration with MBEDTLS_USE_PSA_CRYPTO and \
|
||||
MBEDTLS_ECDSA_C requires MBEDTLS_PK_WRITE_C to be defined."
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \
|
||||
!defined(MBEDTLS_OID_C) )
|
||||
#error "MBEDTLS_RSA_C defined, but not all prerequisites"
|
||||
|
|
Loading…
Reference in a new issue