Add a check for an RSA_ALT key in check_pair

This commit is contained in:
Unknown 2018-02-08 06:37:57 -05:00
parent b60dc2d21e
commit 8fb94311e9

View File

@ -329,7 +329,8 @@ int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_conte
return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE );
}
if( prv->pk_info->type != MBEDTLS_PK_OPAQUE )
if( prv->pk_info->type != MBEDTLS_PK_RSA_ALT &&
prv->pk_info->type != MBEDTLS_PK_OPAQUE )
{
if( pub->pk_info != prv->pk_info )
return( MBEDTLS_ERR_PK_TYPE_MISMATCH );