---
name: "libressl-ASN1_item_verify"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-ASN1_item_verify"
---

# libressl-ASN1\_item\_verify(3)

signature verification for ASN.1 values

## NAME

**ASN1\_item\_verify** – signature verification for ASN.1 values

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/x509.h\>**

*int*\

**ASN1\_item\_verify**(*const ASN1\_ITEM \*it*, *X509\_ALGOR \*algor1*, *ASN1\_BIT\_STRING \*sig\_in*, *void \*val\_in*, *EVP\_PKEY \*pkey*);

## DESCRIPTION

**ASN1\_item\_verify**() assumes that *val\_in* is an *ASN1\_VALUE* of the type specified by *it*, encodes it into DER format by calling ASN1\_item\_i2d(3), and verifies in a way similar to EVP\_DigestVerify(3) that *sig\_in* contains a valid signature of the resulting byte array, a signature that was created with the signature algorithm *algor1* and the private key corresponding to the public key *pkey*.

## RETURN VALUES

**ASN1\_item\_verify**() returns 1 if signature verification succeeds, 0 if signature verification fails, or -1 if *pkey* is NULL, if *sig\_in* contains invalid flags, or if *algor1* requests an invalid or unsupported digest algorithm or does not work with the given *pkey*.

## SEE ALSO

ASN1\_BIT\_STRING\_new(3), ASN1\_item\_i2d(3), ASN1\_item\_sign(3), EVP\_DigestVerify(3), EVP\_PKEY\_new(3), OBJ\_find\_sigid\_algs(3), X509\_ALGOR\_new(3)

## HISTORY

**ASN1\_item\_verify**() first appeared in OpenSSL 0.9.7 and has been available since OpenBSD 3.1.
