mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-29 08:24:11 -04:00
ecjpake: fix guards for driver only builds
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
fea765ba17
commit
82b484ecbc
@ -290,6 +290,17 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
|
/* Helper for JPAKE dependencies, will be undefined at the end of the file */
|
||||||
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
|
#if defined(PSA_HAVE_FULL_JPAKE)
|
||||||
|
#define MBEDTLS_PK_HAVE_JPAKE
|
||||||
|
#endif
|
||||||
|
#else /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
#if defined(MBEDTLS_ECJPAKE_C)
|
||||||
|
#define MBEDTLS_PK_HAVE_JPAKE
|
||||||
|
#endif
|
||||||
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
|
||||||
( !defined(MBEDTLS_ECDH_C) || \
|
( !defined(MBEDTLS_ECDH_C) || \
|
||||||
!defined(MBEDTLS_PK_HAVE_ECDSA) || \
|
!defined(MBEDTLS_PK_HAVE_ECDSA) || \
|
||||||
@ -344,7 +355,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) && \
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) && \
|
||||||
( !defined(MBEDTLS_ECJPAKE_C) || \
|
( !defined(MBEDTLS_PK_HAVE_JPAKE) || \
|
||||||
!defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) )
|
!defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) )
|
||||||
#error "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED defined, but not all prerequisites"
|
#error "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
@ -1081,6 +1092,7 @@
|
|||||||
|
|
||||||
/* Undefine helper symbols */
|
/* Undefine helper symbols */
|
||||||
#undef MBEDTLS_PK_HAVE_ECDSA
|
#undef MBEDTLS_PK_HAVE_ECDSA
|
||||||
|
#undef MBEDTLS_PK_HAVE_JPAKE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Avoid warning from -pedantic. This is a convenient place for this
|
* Avoid warning from -pedantic. This is a convenient place for this
|
||||||
|
@ -848,6 +848,11 @@ extern "C" {
|
|||||||
#define PSA_HAVE_FULL_ECDSA 1
|
#define PSA_HAVE_FULL_ECDSA 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PSA_WANT_ALG_JPAKE) && defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR) && \
|
||||||
|
defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
|
||||||
|
#define PSA_HAVE_FULL_JPAKE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* These features are always enabled. */
|
/* These features are always enabled. */
|
||||||
#define PSA_WANT_KEY_TYPE_DERIVE 1
|
#define PSA_WANT_KEY_TYPE_DERIVE 1
|
||||||
#define PSA_WANT_KEY_TYPE_PASSWORD 1
|
#define PSA_WANT_KEY_TYPE_PASSWORD 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user