EVP_PKEY_verify

Verify a signature over tbs using an initialised key context.

Synopsis

Declared in <openssl/evp.h>

int
EVP_PKEY_verify(
    EVP_PKEY_CTX* ctx,
    unsigned char const* sig,
    size_t siglen,
    unsigned char const* tbs,
    size_t tbslen);

Return Value

1 if the signature is valid, 0 if invalid, or a negative value on error.

Parameters

NameDescription
ctxContext previously prepared with EVP_PKEY_verify_init() or _ex().
sigSignature bytes to verify.
siglenLength of sig in bytes.
tbsData that was signed (typically a digest or raw message).
tbslenLength of tbs in bytes.