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