Fixed -Wunused warnings when building without asymmetric crypto

This commit is contained in:
Gilles Peskine 2019-10-10 20:36:12 +02:00
parent fec306452b
commit b16841ee69
3 changed files with 8 additions and 2 deletions

View File

@ -230,10 +230,12 @@ static inline int mbedtls_psa_get_ecc_oid_from_id(
*oid_len = MBEDTLS_OID_SIZE( MBEDTLS_OID_EC_GRP_BP512R1 );
return( 0 );
#endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */
}
default:
(void) oid;
(void) oid_len;
return( -1 );
}
}
#define MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH 1

View File

@ -2003,6 +2003,7 @@ exit:
/* Message digests */
/****************************************************************/
#if defined(MBEDTLS_RSA_C) || defined(MBEDTLS_ECDSA_DETERMINISTIC)
static const mbedtls_md_info_t *mbedtls_md_info_from_psa( psa_algorithm_t alg )
{
switch( alg )
@ -2043,6 +2044,7 @@ static const mbedtls_md_info_t *mbedtls_md_info_from_psa( psa_algorithm_t alg )
return( NULL );
}
}
#endif
psa_status_t psa_hash_abort( psa_hash_operation_t *operation )
{

View File

@ -894,6 +894,8 @@ static int exported_key_sanity_check( psa_key_type_t type, size_t bits,
"No sanity check for public key type=0x%08lx",
(unsigned long) type );
test_fail( message, __LINE__, __FILE__ );
(void) p;
(void) end;
return( 0 );
}
}