mirror of
https://github.com/cuberite/polarssl.git
synced 2025-10-03 10:34:16 -04:00
Only accept RSA key pair in mbedtls_pk_setup_opaque()
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
c1152e4a0f
commit
eccf88fa48
@ -169,7 +169,7 @@ int mbedtls_pk_setup_opaque( mbedtls_pk_context *ctx,
|
|||||||
|
|
||||||
if( PSA_KEY_TYPE_IS_ECC_KEY_PAIR( type ) )
|
if( PSA_KEY_TYPE_IS_ECC_KEY_PAIR( type ) )
|
||||||
info = &mbedtls_pk_ecdsa_opaque_info;
|
info = &mbedtls_pk_ecdsa_opaque_info;
|
||||||
else if( PSA_KEY_TYPE_IS_RSA( type ) )
|
else if( type == PSA_KEY_TYPE_RSA_KEY_PAIR )
|
||||||
info = &mbedtls_pk_rsa_opaque_info;
|
info = &mbedtls_pk_rsa_opaque_info;
|
||||||
else
|
else
|
||||||
return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE );
|
return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user