Verify signature over the DER encoding of data described by it.

Synopsis

Declared in <openssl/asn1.h>

int
ASN1_item_verify_ex(
    ASN1_ITEM const* it,
    X509_ALGOR const* alg,
    ASN1_BIT_STRING const* signature,
    void const* data,
    ASN1_OCTET_STRING const* id,
    EVP_PKEY* pkey,
    OSSL_LIB_CTX* libctx,
    char const* propq);

Return Value

1 on success, 0 on failure, or ‐1 on a more serious error.

Parameters

Name

Description

it

ASN.1 item describing the type of data.

alg

Signature AlgorithmIdentifier.

signature

BIT STRING holding the signature bytes.

data

Object whose DER encoding is verified.

id

Optional ASN.1 OCTET STRING identity / SM2‐id parameter, or NULL.

pkey

Public key used to verify the signature.

libctx

Library context for algorithm fetches, or NULL for the default.

propq

Property query for algorithm fetches, or NULL.

Created with MrDocs