]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/X509_check_ca.pod
Expand the XTS documentation
[thirdparty/openssl.git] / doc / man3 / X509_check_ca.pod
CommitLineData
c03726ca
RS
1=pod
2
3=head1 NAME
4
5X509_check_ca - check if given certificate is CA certificate
6
7=head1 SYNOPSIS
8
e9b77246 9 #include <openssl/x509v3.h>
c03726ca 10
e9b77246 11 int X509_check_ca(X509 *cert);
c03726ca
RS
12
13=head1 DESCRIPTION
14
15This function checks if given certificate is CA certificate (can be used
16to sign other certificates).
17
1f13ad31 18=head1 RETURN VALUES
c03726ca
RS
19
20Function return 0, if it is not CA certificate, 1 if it is proper X509v3
21CA certificate with B<basicConstraints> extension CA:TRUE,
0ad69cd6 223, if it is self-signed X509 v1 certificate, 4, if it is certificate with
c03726ca
RS
23B<keyUsage> extension with bit B<keyCertSign> set, but without
24B<basicConstraints>, and 5 if it has outdated Netscape Certificate Type
25extension telling that it is CA certificate.
26
33328581
MC
27This function will also return 0 on error.
28
9c0586d5 29Actually, any nonzero value means that this certificate could have been
c03726ca
RS
30used to sign other certificates.
31
32=head1 SEE ALSO
33
34L<X509_verify_cert(3)>,
35L<X509_check_issued(3)>,
36L<X509_check_purpose(3)>
37
e2f92610
RS
38=head1 COPYRIGHT
39
61f805c1 40Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 41
4746f25a 42Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
43this file except in compliance with the License. You can obtain a copy
44in the file LICENSE in the source distribution or at
45L<https://www.openssl.org/source/license.html>.
46
47=cut