xref: /freebsd/crypto/openssl/doc/man3/X509_check_issued.pod (revision 58f351825a371d1a3dd693d6f64a1245ea851a51)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5*58f35182SJung-uk KimX509_check_issued - checks if certificate is apparently issued by another
6e71b7053SJung-uk Kimcertificate
7e71b7053SJung-uk Kim
8e71b7053SJung-uk Kim=head1 SYNOPSIS
9e71b7053SJung-uk Kim
10e71b7053SJung-uk Kim #include <openssl/x509v3.h>
11e71b7053SJung-uk Kim
12e71b7053SJung-uk Kim int X509_check_issued(X509 *issuer, X509 *subject);
13e71b7053SJung-uk Kim
14e71b7053SJung-uk Kim
15e71b7053SJung-uk Kim=head1 DESCRIPTION
16e71b7053SJung-uk Kim
17*58f35182SJung-uk KimX509_check_issued() checks if certificate I<subject> was apparently issued
18*58f35182SJung-uk Kimusing (CA) certificate I<issuer>. This function takes into account not only
19*58f35182SJung-uk Kimmatching of the issuer field of I<subject> with the subject field of I<issuer>,
20*58f35182SJung-uk Kimbut also compares all sub-fields of the B<authorityKeyIdentifier> extension of
21*58f35182SJung-uk KimI<subject>, as far as present, with the respective B<subjectKeyIdentifier>,
22*58f35182SJung-uk Kimserial number, and issuer fields of I<issuer>, as far as present. It also checks
23*58f35182SJung-uk Kimif the B<keyUsage> field (if present) of I<issuer> allows certificate signing.
24*58f35182SJung-uk KimIt does not check the certificate signature.
25e71b7053SJung-uk Kim
26e71b7053SJung-uk Kim=head1 RETURN VALUES
27e71b7053SJung-uk Kim
28e71b7053SJung-uk KimFunction return B<X509_V_OK> if certificate I<subject> is issued by
29e71b7053SJung-uk KimI<issuer> or some B<X509_V_ERR*> constant to indicate an error.
30e71b7053SJung-uk Kim
31e71b7053SJung-uk Kim=head1 SEE ALSO
32e71b7053SJung-uk Kim
33e71b7053SJung-uk KimL<X509_verify_cert(3)>,
34e71b7053SJung-uk KimL<X509_check_ca(3)>,
35e71b7053SJung-uk KimL<verify(1)>
36e71b7053SJung-uk Kim
37e71b7053SJung-uk Kim=head1 COPYRIGHT
38e71b7053SJung-uk Kim
39*58f35182SJung-uk KimCopyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
40e71b7053SJung-uk Kim
41e71b7053SJung-uk KimLicensed under the OpenSSL license (the "License").  You may not use
42e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
43e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
44e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
45e71b7053SJung-uk Kim
46e71b7053SJung-uk Kim=cut
47