mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
PK: use NULL for unimplemented operations
This commit is contained in:
@ -127,6 +127,9 @@ int pk_verify( pk_context *ctx, md_type_t md_alg,
|
||||
if( ctx == NULL || ctx->pk_info == NULL )
|
||||
return( POLARSSL_ERR_PK_BAD_INPUT_DATA );
|
||||
|
||||
if( ctx->pk_info->verify_func == NULL )
|
||||
return( POLARSSL_ERR_PK_TYPE_MISMATCH );
|
||||
|
||||
return( ctx->pk_info->verify_func( ctx->pk_ctx, md_alg,
|
||||
hash, hash_len,
|
||||
sig, sig_len ) );
|
||||
|
Reference in New Issue
Block a user