[#ASN1_item_verify_ctx]
= ASN1&lowbar;item&lowbar;verify&lowbar;ctx
:mrdocs:

Verify `signature` over the ASN&period;1 encoding of `data` using digest context `ctx&period;`

== Synopsis

Declared in `&lt;openssl&sol;x509&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
ASN1&lowbar;item&lowbar;verify&lowbar;ctx(
    xref:ASN1_ITEM.adoc[ASN1&lowbar;ITEM] const* it,
    xref:X509_ALGOR.adoc[X509&lowbar;ALGOR] const* alg,
    xref:ASN1_BIT_STRING.adoc[ASN1&lowbar;BIT&lowbar;STRING] const* signature,
    void const* data,
    xref:EVP_MD_CTX.adoc[EVP&lowbar;MD&lowbar;CTX]* ctx);
----

== Return Value

1 if the signature is valid, 0 if invalid, or a negative value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *it*
| ASN&period;1 item describing the signed structure type of `data&period;`
| *alg*
| Signature AlgorithmIdentifier&period;
| *signature*
| BIT STRING signature value&period;
| *data*
| Pointer to the structure instance to re&hyphen;encode and verify&period;
| *ctx*
| Digest&sol;verify context already configured with the public key and algorithm&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
