pub unsafe extern "C" fn mbedtls_pk_verify_ext(
    type_: mbedtls_pk_type_t,
    options: *const c_void,
    ctx: *mut mbedtls_pk_context,
    md_alg: mbedtls_md_type_t,
    hash: *const c_uchar,
    hash_len: usize,
    sig: *const c_uchar,
    sig_len: usize
) -> c_int
Expand description

\brief Verify signature, with options. (Includes verification of the padding depending on type.)

\param type Signature type (inc. possible padding type) to verify \param options Pointer to type-specific options, or NULL \param ctx The PK context to use. It must have been set up. \param md_alg Hash algorithm used (see notes) \param hash Hash of the message to sign \param hash_len Hash length or 0 (see notes) \param sig Signature to verify \param sig_len Signature length

\return 0 on success (signature is valid), #MBEDTLS_ERR_PK_TYPE_MISMATCH if the PK context can’t be used for this type of signatures, #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid signature in \p sig but its length is less than \p sig_len, or a specific error code.

\note If hash_len is 0, then the length associated with md_alg is used instead, or an error returned if it is invalid.

\note md_alg may be MBEDTLS_MD_NONE, only if hash_len != 0

\note If type is MBEDTLS_PK_RSASSA_PSS, then options must point to a mbedtls_pk_rsassa_pss_options structure, otherwise it must be NULL. Note that if #MBEDTLS_USE_PSA_CRYPTO is defined, the salt length is not verified as PSA_ALG_RSA_PSS_ANY_SALT is used.