mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 16:15:34 +00:00
Implement x509_profile_check_key() for TinyCrypt-based PK context
This commit is contained in:
parent
06e2bf6d01
commit
d931ad2aca
|
@ -597,6 +597,16 @@ static int x509_profile_check_key( const mbedtls_x509_crt_profile *profile,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_USE_TINYCRYPT)
|
||||
if( pk_alg == MBEDTLS_PK_ECKEY )
|
||||
{
|
||||
if( ( profile->allowed_curves & MBEDTLS_UECC_DP_SECP256R1 ) != 0 )
|
||||
return( 0 );
|
||||
|
||||
return( -1 );
|
||||
}
|
||||
#endif /* MBEDTLS_USE_TINYCRYPT */
|
||||
|
||||
#if defined(MBEDTLS_ECP_C)
|
||||
if( pk_alg == MBEDTLS_PK_ECDSA ||
|
||||
pk_alg == MBEDTLS_PK_ECKEY ||
|
||||
|
|
Loading…
Reference in a new issue