Fix undefined ref error when ECDSA not defined
Add guards in pk_wrap.c to ensure if ECDSA is not defined, errors
are returned.
Remove warnings in pk.c for unused variables.
Add new test (test_depends_pkalgs_psa) to all.sh to confirm
when USE_PSA_CRYPTO is defined that features are working properly.
Fix #3294
Signed-off-by: John Durkop <john.durkop@fermatsoftware.com>
diff --git a/library/pk.c b/library/pk.c
index 631415c..6706344 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -593,6 +593,9 @@
psa_algorithm_t hash_alg )
{
#if !defined(MBEDTLS_ECP_C)
+ ((void) pk);
+ ((void) handle);
+ ((void) hash_alg);
return( MBEDTLS_ERR_PK_TYPE_MISMATCH );
#else
const mbedtls_ecp_keypair *ec;