summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2024-12-28 10:19:45 +0000
committerschwarze <>2024-12-28 10:19:45 +0000
commit2d704d09cd1a78115e2d10a4918602191ed0a6fd (patch)
tree2294b92ea974eeabb0191dec5a4ce62b4e122c0e
parenteb9d62d3efc9d950f259707d96c9bcea080916de (diff)
downloadopenbsd-2d704d09cd1a78115e2d10a4918602191ed0a6fd.tar.gz
openbsd-2d704d09cd1a78115e2d10a4918602191ed0a6fd.tar.bz2
openbsd-2d704d09cd1a78115e2d10a4918602191ed0a6fd.zip
Document X509V3_EXT_print_fp(3).
Sort the list of decoding functions alphabetically by extension type. List the printing functions that are already documented.
-rw-r--r--src/lib/libcrypto/man/X509V3_EXT_print.395
1 files changed, 67 insertions, 28 deletions
diff --git a/src/lib/libcrypto/man/X509V3_EXT_print.3 b/src/lib/libcrypto/man/X509V3_EXT_print.3
index 0c695842b7..edb97d3a36 100644
--- a/src/lib/libcrypto/man/X509V3_EXT_print.3
+++ b/src/lib/libcrypto/man/X509V3_EXT_print.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: X509V3_EXT_print.3,v 1.2 2021/07/12 14:54:00 schwarze Exp $ 1.\" $OpenBSD: X509V3_EXT_print.3,v 1.3 2024/12/28 10:19:45 schwarze Exp $
2.\" 2.\"
3.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2021, 2024 Ingo Schwarze <schwarze@openbsd.org>
4.\" 4.\"
5.\" Permission to use, copy, modify, and distribute this software for any 5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above 6.\" purpose with or without fee is hereby granted, provided that the above
@@ -14,11 +14,12 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: July 12 2021 $ 17.Dd $Mdocdate: December 28 2024 $
18.Dt X509V3_EXT_PRINT 3 18.Dt X509V3_EXT_PRINT 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
21.Nm X509V3_EXT_print 21.Nm X509V3_EXT_print ,
22.Nm X509V3_EXT_print_fp
22.Nd pretty-print an X.509 extension 23.Nd pretty-print an X.509 extension
23.Sh SYNOPSIS 24.Sh SYNOPSIS
24.In openssl/x509v3.h 25.In openssl/x509v3.h
@@ -29,13 +30,24 @@
29.Fa "unsigned long flags" 30.Fa "unsigned long flags"
30.Fa "int indent" 31.Fa "int indent"
31.Fc 32.Fc
33.Ft int
34.Fo X509V3_EXT_print_fp
35.Fa "FILE *file"
36.Fa "X509_EXTENSION *ext"
37.Fa "int flags"
38.Fa "int indent"
39.Fc
32.Sh DESCRIPTION 40.Sh DESCRIPTION
33.Fn X509V3_EXT_print 41.Fn X509V3_EXT_print
34decodes 42and
43.Fn X509V3_EXT_print_fp
44decode
35.Fa ext 45.Fa ext
36and prints the data contained in it to 46and print the data contained in it to the
37.Fa bio 47.Fa bio
38in a human-readable format with a left margin of 48or
49.Fa file ,
50respectively, in a human-readable format with a left margin of
39.Fa indent 51.Fa indent
40space characters. 52space characters.
41The details of both the decoding and the printing depend on the type of 53The details of both the decoding and the printing depend on the type of
@@ -47,36 +59,63 @@ as it would be done by the appropriate public API function, for example:
47.Bl -tag -width NID_authority_key_identifier -compact 59.Bl -tag -width NID_authority_key_identifier -compact
48.It Sy extension type 60.It Sy extension type
49.Sy decoding function 61.Sy decoding function
50.It Dv NID_subject_key_identifier 62.It Dv NID_authority_key_identifier
51.Xr d2i_ASN1_OCTET_STRING 3 63.Xr d2i_AUTHORITY_KEYID 3
52.It Dv NID_key_usage 64.It Dv NID_certificate_policies
53.Xr d2i_ASN1_BIT_STRING 3 65.Xr d2i_CERTIFICATEPOLICIES 3
54.It Dv NID_crl_number 66.It Dv NID_crl_number
55.Xr d2i_ASN1_INTEGER 3 67.Xr d2i_ASN1_INTEGER 3
56.It Dv NID_crl_reason 68.It Dv NID_crl_reason
57.Xr d2i_ASN1_ENUMERATED 3 69.Xr d2i_ASN1_ENUMERATED 3
58.It Dv NID_invalidity_date
59.Xr d2i_ASN1_GENERALIZEDTIME 3
60.It Dv NID_subject_alt_name
61.Xr d2i_GENERAL_NAMES 3
62.It Dv NID_hold_instruction_code 70.It Dv NID_hold_instruction_code
63.Xr d2i_ASN1_OBJECT 3 71.Xr d2i_ASN1_OBJECT 3
64.It Dv NID_id_pkix_OCSP_noCheck
65.Xr d2i_ASN1_NULL 3
66.It Dv NID_authority_key_identifier
67.Xr d2i_AUTHORITY_KEYID 3
68.It Dv NID_certificate_policies
69.Xr d2i_CERTIFICATEPOLICIES 3
70.It Dv NID_id_pkix_OCSP_CrlID 72.It Dv NID_id_pkix_OCSP_CrlID
71.Xr d2i_OCSP_CRLID 3 73.Xr d2i_OCSP_CRLID 3
74.It Dv NID_id_pkix_OCSP_noCheck
75.Xr d2i_ASN1_NULL 3
72.It Dv NID_id_pkix_OCSP_Nonce 76.It Dv NID_id_pkix_OCSP_Nonce
73non-public function built into the library 77non-public function built into the library
78.It Dv NID_invalidity_date
79.Xr d2i_ASN1_GENERALIZEDTIME 3
80.It Dv NID_key_usage
81.Xr d2i_ASN1_BIT_STRING 3
82.It Dv NID_subject_alt_name
83.Xr d2i_GENERAL_NAMES 3
84.It Dv NID_subject_key_identifier
85.Xr d2i_ASN1_OCTET_STRING 3
74.El 86.El
75.Pp 87.Pp
76For some types, the printing is performed 88For some types, the printing is performed
77by a dedicated non-public function built into the library. 89by a dedicated non-public function built into the library.
78For some other types, the printing function is a public API function, 90For some other types, the printing function is a public API function,
79but none of these printing functions are documented yet. 91for example:
92.Pp
93.Bl -tag -width NID_id_pkix_OCSP_archiveCutoff -compact
94.It Sy extension type
95.Sy printing function
96.It Dv NID_crl_number
97.Xr i2s_ASN1_INTEGER 3
98.It Dv NID_crl_reason
99.Xr i2s_ASN1_ENUMERATED_TABLE 3
100.It Dv NID_delta_crl
101.Xr i2s_ASN1_INTEGER 3
102.It Dv NID_hold_instruction_code
103.Xr i2a_ASN1_OBJECT 3
104.It Dv NID_id_pkix_OCSP_archiveCutoff
105.Xr ASN1_GENERALIZEDTIME_print 3
106.It Dv NID_id_pkix_OCSP_Nonce
107.Xr i2a_ASN1_STRING 3
108.It Dv NID_inhibit_any_policy
109.Xr i2s_ASN1_INTEGER 3
110.It Dv NID_invalidity_date
111.Xr ASN1_GENERALIZEDTIME_print 3
112.It Dv NID_key_usage
113.Xr i2v_ASN1_BIT_STRING 3
114.It Dv NID_subject_key_identifier
115.Xr i2s_ASN1_OCTET_STRING 3
116.El
117.Pp
118Some of the public printing functions are not documented yet.
80.Pp 119.Pp
81If 120If
82.Fa ext 121.Fa ext
@@ -133,7 +172,9 @@ are set, nothing is printed and printing is considered as failed.
133.El 172.El
134.Sh RETURN VALUES 173.Sh RETURN VALUES
135.Fn X509V3_EXT_print 174.Fn X509V3_EXT_print
136returns 0 if failure was both detected and considered relevant. 175and
176.Fn X509V3_EXT_print_fp
177return 0 if failure was both detected and considered relevant.
137Otherwise, 1 is returned, and in general the user cannot tell whether 178Otherwise, 1 is returned, and in general the user cannot tell whether
138failure simply went undetected, whether the function detected failure 179failure simply went undetected, whether the function detected failure
139but regarded it as irrelevant, or whether printing did indeed 180but regarded it as irrelevant, or whether printing did indeed
@@ -145,12 +186,10 @@ succeed.
145.Xr X509_get_ext 3 , 186.Xr X509_get_ext 3 ,
146.Xr X509V3_extensions_print 3 187.Xr X509V3_extensions_print 3
147.Sh HISTORY 188.Sh HISTORY
148.Fn X509V3_EXT_print 189These functions first appeared in OpenSSL 0.9.2 and have been available since
149first appeared in OpenSSL 0.9.2 and has been available since
150.Ox 2.6 . 190.Ox 2.6 .
151.Sh BUGS 191.Sh BUGS
152.Fn X509V3_EXT_print 192These functions lack error handling throughout.
153lacks error handling throughout. 193When a write operation fails, they will usually ignore the fact that
154When a write operation fails, it will usually ignore the fact that
155information was omitted from the output and report success to the 194information was omitted from the output and report success to the
156caller anyway. 195caller anyway.