X509_CHECK_CA(3ossl)
πΈ NAME
hiii bestie π welcome to the X509_CHECK_CA(3ossl) page β manual name 3ossl, OpenSSL girlies rise. This page is all about one little function doing a CA vibe check.
X509_check_ca β check if given certificate is CA certificate.
β¨ SYNOPSIS
#include <openssl/x509v3.h>
int X509_check_ca(X509 *cert);
π DESCRIPTION
okay so X509_check_ca() checks if the given certificate is a CA certificate β you know, the kind that can be used to sign other certificates. It's giving "are you the main character who signs the other certs?" energy. π
The certificate must be a complete certificate otherwise an error is returned. No incomplete-cert chaos allowed, bestie. π«
π RETURN VALUES
Here's the return-value tea, and yes you need every number:
0β not a CA certificate.1β proper X509v3 CA certificate withbasicConstraintsextensionCA:TRUE.3β self-signed X509 v1 certificate.4β certificate withkeyUsageextension with bitkeyCertSignset, but withoutbasicConstraints.5β has outdated Netscape Certificate Type extension telling that it is CA certificate.
This function will also return 0 on error. So 0 is doing double duty: "not a CA" and "oops, error." π
Actually, any nonzero value means that this certificate could have been used to sign other certificates. So nonzero = potentially signer-cert material, periodt. β¨
π¦ SEE ALSO
go read these next, bestie π«Ά
π COPYRIGHT
Legal bestie moment, keep it exact:
Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the fileLICENSEin the source distribution or at<https://www.openssl.org/source/license.html>.
This iconic page is from OpenSSL 3.5.0, dated 2026-09-25 β slay, bye π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms