carta
libressl-X509_verify_cert(3)

libressl-X509_verify_cert3

Discover and verify x509 certificate chain

Usage

Crypto Library (libcrypto, -lcrypto)

int

Overview

The X509_verify_cert() function attempts to discover and validate a certificate chain based on parameters in ctx.

Applications rarely call this function directly, but it is used by OpenSSL internally for certificate validation, in both the S/MIME and SSL/TLS code.

Return values

If a complete chain can be built and validated this function returns 1, otherwise it returns a value <= 0 indicating failure.

Additional error information can be obtained by examining ctx, using X509_STORE_CTX_get_error(3).

History

X509_verify_cert() first appeared in SSLeay 0.8.0 and has been available since OpenBSD 2.4.

Bugs

This function uses the header ⟨openssl/x509.h⟩ as opposed to most chain verification functions which use ⟨openssl/x509_vfy.h⟩.

From libressl 4.4.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.