xref: /freebsd/crypto/openssl/doc/man3/X509_ACERT_print_ex.pod (revision e7be843b4a162e68651d3911f0357ed464915629)
1*e7be843bSPierre Pronchery=pod
2*e7be843bSPierre Pronchery
3*e7be843bSPierre Pronchery=head1 NAME
4*e7be843bSPierre Pronchery
5*e7be843bSPierre ProncheryX509_ACERT_print_ex, X509_ACERT_print
6*e7be843bSPierre Pronchery- X509_ACERT printing routines
7*e7be843bSPierre Pronchery
8*e7be843bSPierre Pronchery=head1 SYNOPSIS
9*e7be843bSPierre Pronchery
10*e7be843bSPierre Pronchery #include <openssl/x509_acert.h>
11*e7be843bSPierre Pronchery
12*e7be843bSPierre Pronchery int X509_ACERT_print(BIO *bp, X509_ACERT *acert);
13*e7be843bSPierre Pronchery int X509_ACERT_print_ex(BIO *bp, X509_ACERT *acert, unsigned long nmflags,
14*e7be843bSPierre Pronchery                         unsigned long cflag);
15*e7be843bSPierre Pronchery
16*e7be843bSPierre Pronchery=head1 DESCRIPTION
17*e7be843bSPierre Pronchery
18*e7be843bSPierre ProncheryX509_ACERT_print_ex() prints a human readable version of the attribute
19*e7be843bSPierre Proncherycertificate I<acert> to BIO I<bp>.
20*e7be843bSPierre Pronchery
21*e7be843bSPierre ProncheryThe following data contained in the attribute certificate is printed
22*e7be843bSPierre Proncheryin order:
23*e7be843bSPierre Pronchery
24*e7be843bSPierre Pronchery=over 4
25*e7be843bSPierre Pronchery
26*e7be843bSPierre Pronchery=item *
27*e7be843bSPierre Pronchery
28*e7be843bSPierre ProncheryThe header text "Attribute certificate:" and "Data:" (X509_FLAG_NO_HEADER)
29*e7be843bSPierre Pronchery
30*e7be843bSPierre Pronchery= item *
31*e7be843bSPierre Pronchery
32*e7be843bSPierre ProncheryThe attribute certificate version number as defined by the standard,
33*e7be843bSPierre Proncheryfollowed in parentheses by the value contained in the version field in
34*e7be843bSPierre Proncheryhexadecimal notation.  If the version number is not a valid value according
35*e7be843bSPierre Proncheryto the specification, only the raw value is printed.
36*e7be843bSPierre ProncherySee X509_ACERT_get_version(3) for details. (X509_FLAG_NO_VERSION)
37*e7be843bSPierre Pronchery
38*e7be843bSPierre Pronchery= item *
39*e7be843bSPierre Pronchery
40*e7be843bSPierre ProncheryThe serial number of the attribute certificate (X509_FLAG_NO_SERIAL)
41*e7be843bSPierre Pronchery
42*e7be843bSPierre Pronchery= item *
43*e7be843bSPierre Pronchery
44*e7be843bSPierre ProncheryThe identity of the holder of the attribute certificate. If the
45*e7be843bSPierre Proncheryholder issuer name is present, the first GENERAL_NAME
46*e7be843bSPierre Proncheryreturned by X509_ACERT_get0_holder_entityName() is printed.
47*e7be843bSPierre ProncheryIf the holder baseCertificateId is present, the issuer name
48*e7be843bSPierre Pronchery(printed with X509_NAME_print_ex) and serial number of the
49*e7be843bSPierre Proncheryholder's certificate are displayed. (X509_FLAG_NO_SUBJECT)
50*e7be843bSPierre Pronchery
51*e7be843bSPierre Pronchery= item *
52*e7be843bSPierre Pronchery
53*e7be843bSPierre ProncheryThe name of the attribute certificate issuer as returned from
54*e7be843bSPierre ProncheryX509_ACERT_get0_issuerName() and printed using X509_NAME_print_ex().
55*e7be843bSPierre Pronchery(X509_FLAG_NO_ISSUER)
56*e7be843bSPierre Pronchery
57*e7be843bSPierre Pronchery= item *
58*e7be843bSPierre Pronchery
59*e7be843bSPierre ProncheryThe period of validity between the times returned from X509_ACERT_get0_notBefore()
60*e7be843bSPierre Proncheryand  X509_ACERT_get0_notAfter().  The values are printed as a generalized times
61*e7be843bSPierre Proncheryusing ASN1_GENERALIZEDTIME_print(). (X509_FLAG_NO_VALIDITY)
62*e7be843bSPierre Pronchery
63*e7be843bSPierre Pronchery= item *
64*e7be843bSPierre Pronchery
65*e7be843bSPierre ProncheryThe list of attributes contained in the attribute certificate.
66*e7be843bSPierre ProncheryThe attribute type is printed with i2a_ASN1_OBJECT().  String valued
67*e7be843bSPierre Proncheryattributes are printed as raw string data. ASN1 encoded values are
68*e7be843bSPierre Proncheryprinted with ASN1_parse_dump().  (X509_FLAG_NO_ATTRIBUTES)
69*e7be843bSPierre Pronchery
70*e7be843bSPierre Pronchery= item *
71*e7be843bSPierre Pronchery
72*e7be843bSPierre ProncheryAll X.509 extensions contained in the attribute certificate. (X509_FLAG_NO_EXTENSIONS)
73*e7be843bSPierre Pronchery
74*e7be843bSPierre Pronchery= item *
75*e7be843bSPierre Pronchery
76*e7be843bSPierre ProncheryThe signature is printed with X509_signature_print(). (X509_FLAG_NO_SIGDUMP)
77*e7be843bSPierre Pronchery
78*e7be843bSPierre ProncheryIf I<cflag> is specifies as X509_FLAG_COMPAT, all of the above data in the
79*e7be843bSPierre Proncheryattribute certificate will be printed.
80*e7be843bSPierre Pronchery
81*e7be843bSPierre ProncheryThe I<nmflags> flag determines the format used to output all fields printed using
82*e7be843bSPierre ProncheryX509_NAME_print_ex(). See L<X509_NAME_print_ex(3)> for details.
83*e7be843bSPierre Pronchery
84*e7be843bSPierre ProncheryX509_ACERT_print() is equivalent to calling X509_ACERT_print_ex() with the
85*e7be843bSPierre ProncheryI<nmflags> and I<cflags> set to XN_FLAG_COMPAT and X509_FLAG_COMPAT
86*e7be843bSPierre Proncheryrespectively.
87*e7be843bSPierre Pronchery
88*e7be843bSPierre Pronchery=back
89*e7be843bSPierre Pronchery
90*e7be843bSPierre Pronchery=head1 RETURN VALUES
91*e7be843bSPierre Pronchery
92*e7be843bSPierre ProncheryX509_ACERT_print_ex() X509_ACERT_print() return 1 for
93*e7be843bSPierre Proncherysuccess and 0 for failure.
94*e7be843bSPierre Pronchery
95*e7be843bSPierre Pronchery=head1 SEE ALSO
96*e7be843bSPierre Pronchery
97*e7be843bSPierre ProncheryL<X509_NAME_print_ex(3)>
98*e7be843bSPierre Pronchery
99*e7be843bSPierre Pronchery=head1 HISTORY
100*e7be843bSPierre Pronchery
101*e7be843bSPierre ProncheryX509_ACERT_print() and X509_ACERT_print_ex() were added in OpenSSL 3.4.
102*e7be843bSPierre Pronchery
103*e7be843bSPierre Pronchery=head1 COPYRIGHT
104*e7be843bSPierre Pronchery
105*e7be843bSPierre ProncheryCopyright 2023-2024 The OpenSSL Project Authors. All Rights Reserved.
106*e7be843bSPierre Pronchery
107*e7be843bSPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
108*e7be843bSPierre Proncherythis file except in compliance with the License.  You can obtain a copy
109*e7be843bSPierre Proncheryin the file LICENSE in the source distribution or at
110*e7be843bSPierre ProncheryL<https://www.openssl.org/source/license.html>.
111*e7be843bSPierre Pronchery
112*e7be843bSPierre Pronchery=cut
113