xref: /freebsd/crypto/openssl/doc/man3/X509_check_issued.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
558f35182SJung-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
1758f35182SJung-uk KimX509_check_issued() checks if certificate I<subject> was apparently issued
1858f35182SJung-uk Kimusing (CA) certificate I<issuer>. This function takes into account not only
1958f35182SJung-uk Kimmatching of the issuer field of I<subject> with the subject field of I<issuer>,
2058f35182SJung-uk Kimbut also compares all sub-fields of the B<authorityKeyIdentifier> extension of
2158f35182SJung-uk KimI<subject>, as far as present, with the respective B<subjectKeyIdentifier>,
2258f35182SJung-uk Kimserial number, and issuer fields of I<issuer>, as far as present. It also checks
2358f35182SJung-uk Kimif the B<keyUsage> field (if present) of I<issuer> allows certificate signing.
24*b077aed3SPierre ProncheryIt does not actually check the certificate signature. An error is returned
25*b077aed3SPierre Proncheryif the I<issuer> or the I<subject> are incomplete certificates.
26e71b7053SJung-uk Kim
27e71b7053SJung-uk Kim=head1 RETURN VALUES
28e71b7053SJung-uk Kim
29*b077aed3SPierre ProncheryX509_check_issued() returns B<X509_V_OK> if all checks are successful
30*b077aed3SPierre Proncheryor some B<X509_V_ERR*> constant to indicate an error.
31e71b7053SJung-uk Kim
32e71b7053SJung-uk Kim=head1 SEE ALSO
33e71b7053SJung-uk Kim
34*b077aed3SPierre ProncheryL<X509_verify_cert(3)>, L<X509_verify(3)>, L<X509_check_ca(3)>,
35*b077aed3SPierre ProncheryL<openssl-verify(1)>, L<X509_self_signed(3)>
36e71b7053SJung-uk Kim
37e71b7053SJung-uk Kim=head1 COPYRIGHT
38e71b7053SJung-uk Kim
39*b077aed3SPierre ProncheryCopyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved.
40e71b7053SJung-uk Kim
41*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (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