mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-10 06:40:16 +00:00
pk: restructure precondition check
This commit is contained in:
parent
b274f2739e
commit
efed323698
@ -508,8 +508,7 @@ int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_conte
|
|||||||
PK_VALIDATE_RET( prv != NULL );
|
PK_VALIDATE_RET( prv != NULL );
|
||||||
|
|
||||||
if( pub->pk_info == NULL ||
|
if( pub->pk_info == NULL ||
|
||||||
prv->pk_info == NULL ||
|
prv->pk_info == NULL )
|
||||||
prv->pk_info->check_pair_func == NULL )
|
|
||||||
{
|
{
|
||||||
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
|
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user