Type Definition bearssl::br_ecdsa_vrfy [] [src]

type br_ecdsa_vrfy = Option<unsafe extern "C" fn(_: *const br_ec_impl, _: *const c_void, _: usize, _: *const br_ec_public_key, _: *const c_void, _: usize) -> u32>;

\brief Type for an ECDSA signature verification function.

A pointer to the EC implementation is provided. The hashed value, computed over the purportedly signed data, is also provided with its length.

The signature format is either "raw" or "asn1", depending on the implementation.

Returned value is 1 on success (valid signature), 0 on error. This function returns 0 if the specified curve is not supported by the provided EC implementation.

\param impl EC implementation to use. \param hash signed data (hashed). \param hash_len hash value length (in bytes). \param pk EC public key. \param sig signature. \param sig_len signature length (in bytes). \return 1 on success, 0 on error.