psa: move PSA_WANT checks to check_crypto_config
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
c51cba92a3
commit
b0d9aaee1c
2 changed files with 54 additions and 34 deletions
|
@ -149,38 +149,6 @@
|
|||
#error "MBEDTLS_ECP_C defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR)
|
||||
#if defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
#error "PSA_WANT_KEY_TYPE_ECC_KEY_PAIR is deprecated and will be removed in a \
|
||||
future version of Mbed TLS. Please switch to new PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_xxx \
|
||||
symbols, where xxx can be: USE, IMPORT, EXPORT, GENERATE, DERIVE"
|
||||
#elif defined(MBEDTLS_DEPRECATED_WARNING)
|
||||
#warning "PSA_WANT_KEY_TYPE_ECC_KEY_PAIR is deprecated and will be removed in a \
|
||||
future version of Mbed TLS. Please switch to new PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_xxx \
|
||||
symbols, where xxx can be: USE, IMPORT, EXPORT, GENERATE, DERIVE"
|
||||
#endif /* MBEDTLS_DEPRECATED_WARNING */
|
||||
#endif /* PSA_WANT_KEY_TYPE_ECC_KEY_PAIR */
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR)
|
||||
#if defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
#error "PSA_WANT_KEY_TYPE_RSA_KEY_PAIR is deprecated and will be removed in a \
|
||||
future version of Mbed TLS. Please switch to new PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_xxx \
|
||||
symbols, where xxx can be: USE, IMPORT, EXPORT, GENERATE, DERIVE"
|
||||
#elif defined(MBEDTLS_DEPRECATED_WARNING)
|
||||
#warning "PSA_WANT_KEY_TYPE_RSA_KEY_PAIR is deprecated and will be removed in a \
|
||||
future version of Mbed TLS. Please switch to new PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_xxx \
|
||||
symbols, where xxx can be: USE, IMPORT, EXPORT, GENERATE, DERIVE"
|
||||
#endif /* MBEDTLS_DEPRECATED_WARNING */
|
||||
#endif /* PSA_WANT_KEY_TYPE_RSA_KEY_PAIR */
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_DERIVE)
|
||||
#error "PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_DERIVE defined, but feature is not supported"
|
||||
#endif
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_DERIVE)
|
||||
#error "PSA_WANT_KEY_TYPE_DH_KEY_PAIR_DERIVE defined, but feature is not supported"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_ASN1_PARSE_C)
|
||||
#error "MBEDTLS_PK_PARSE_C defined, but not all prerequisites"
|
||||
#endif
|
||||
|
|
|
@ -83,9 +83,61 @@
|
|||
#error "PSA_WANT_ALG_RSA_PSS defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_LEGACY) && \
|
||||
#if (defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_USE) || \
|
||||
defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT) || \
|
||||
defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT) || \
|
||||
defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE) || \
|
||||
defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE)) && \
|
||||
!defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
|
||||
#error "MBEDTLS_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_LEGACY defined, but not all prerequisites"
|
||||
#error "PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_xxx defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if (defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_USE) || \
|
||||
defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_IMPORT) || \
|
||||
defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_EXPORT) || \
|
||||
defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE)) && \
|
||||
!defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY)
|
||||
#error "PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_xxx defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if (defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_USE) || \
|
||||
defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_IMPORT) || \
|
||||
defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_EXPORT) || \
|
||||
defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_GENERATE)) && \
|
||||
!defined(PSA_WANT_KEY_TYPE_DH_PUBLIC_KEY)
|
||||
#error "PSA_WANT_KEY_TYPE_DH_KEY_PAIR_xxx defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR)
|
||||
#if defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
#error "PSA_WANT_KEY_TYPE_ECC_KEY_PAIR is deprecated and will be removed in a \
|
||||
future version of Mbed TLS. Please switch to new PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_xxx \
|
||||
symbols, where xxx can be: USE, IMPORT, EXPORT, GENERATE, DERIVE"
|
||||
#elif defined(MBEDTLS_DEPRECATED_WARNING)
|
||||
#warning "PSA_WANT_KEY_TYPE_ECC_KEY_PAIR is deprecated and will be removed in a \
|
||||
future version of Mbed TLS. Please switch to new PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_xxx \
|
||||
symbols, where xxx can be: USE, IMPORT, EXPORT, GENERATE, DERIVE"
|
||||
#endif /* MBEDTLS_DEPRECATED_WARNING */
|
||||
#endif /* PSA_WANT_KEY_TYPE_ECC_KEY_PAIR */
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR)
|
||||
#if defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
#error "PSA_WANT_KEY_TYPE_RSA_KEY_PAIR is deprecated and will be removed in a \
|
||||
future version of Mbed TLS. Please switch to new PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_xxx \
|
||||
symbols, where xxx can be: USE, IMPORT, EXPORT, GENERATE, DERIVE"
|
||||
#elif defined(MBEDTLS_DEPRECATED_WARNING)
|
||||
#warning "PSA_WANT_KEY_TYPE_RSA_KEY_PAIR is deprecated and will be removed in a \
|
||||
future version of Mbed TLS. Please switch to new PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_xxx \
|
||||
symbols, where xxx can be: USE, IMPORT, EXPORT, GENERATE, DERIVE"
|
||||
#endif /* MBEDTLS_DEPRECATED_WARNING */
|
||||
#endif /* PSA_WANT_KEY_TYPE_RSA_KEY_PAIR */
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_DERIVE)
|
||||
#error "PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_DERIVE defined, but feature is not supported"
|
||||
#endif
|
||||
|
||||
#if defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_DERIVE)
|
||||
#error "PSA_WANT_KEY_TYPE_DH_KEY_PAIR_DERIVE defined, but feature is not supported"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
||||
|
|
Loading…
Reference in a new issue