Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix cross-nightly manual

This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.

NAME

X509_verify_cert — discover and verify X509 certificate chain

SYNOPSIS

#include <openssl/x509.h>
int
X509_verify_cert(X509_STORE_CTX *ctx);

DESCRIPTION

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).

SEE ALSO

openssl(1), X509_STORE_CTX_get_error(3), X509_STORE_CTX_new(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>.
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org