summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2016-12-28 03:56:35 +0000
committerschwarze <>2016-12-28 03:56:35 +0000
commit5e926ce5fdd4f8d00af1b900cd2835721480d336 (patch)
treec7c1925224ff34fa32dbce2207bf900e2724bf51
parentbe95f3af5f415b3f044066b1516eea3b5f3325a0 (diff)
downloadopenbsd-5e926ce5fdd4f8d00af1b900cd2835721480d336.tar.gz
openbsd-5e926ce5fdd4f8d00af1b900cd2835721480d336.tar.bz2
openbsd-5e926ce5fdd4f8d00af1b900cd2835721480d336.zip
In contrast to OpenSSL, do not attempt to document the world
in this page - but do include documentation for immediate subobjects that are used nowhere else. All six functions listed in <openssl/x509.h> and in OpenSSL doc/man3/d2i_X509.pod.
-rw-r--r--src/lib/libcrypto/man/d2i_X509.3103
1 files changed, 98 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/d2i_X509.3 b/src/lib/libcrypto/man/d2i_X509.3
index 1b716d2fbb..1ade0a42a8 100644
--- a/src/lib/libcrypto/man/d2i_X509.3
+++ b/src/lib/libcrypto/man/d2i_X509.3
@@ -1,7 +1,24 @@
1.\" $OpenBSD: d2i_X509.3,v 1.5 2016/12/28 03:35:32 schwarze Exp $ 1.\" $OpenBSD: d2i_X509.3,v 1.6 2016/12/28 03:56:35 schwarze Exp $
2.\" OpenSSL 94480b57 Sep 12 23:34:41 2009 +0000 2.\" OpenSSL 94480b57 Sep 12 23:34:41 2009 +0000
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file is a derived work.
5.\" The changes are covered by the following Copyright and license:
6.\"
7.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
8.\"
9.\" Permission to use, copy, modify, and distribute this software for any
10.\" purpose with or without fee is hereby granted, provided that the above
11.\" copyright notice and this permission notice appear in all copies.
12.\"
13.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20.\"
21.\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2002, 2003, 2005, 2009, 2016 The OpenSSL Project. 22.\" Copyright (c) 2002, 2003, 2005, 2009, 2016 The OpenSSL Project.
6.\" All rights reserved. 23.\" All rights reserved.
7.\" 24.\"
@@ -60,7 +77,13 @@
60.Nm i2d_X509_bio , 77.Nm i2d_X509_bio ,
61.Nm i2d_X509_fp , 78.Nm i2d_X509_fp ,
62.Nm d2i_X509_AUX , 79.Nm d2i_X509_AUX ,
63.Nm i2d_X509_AUX 80.Nm i2d_X509_AUX ,
81.Nm d2i_X509_CERT_AUX ,
82.Nm i2d_X509_CERT_AUX ,
83.Nm d2i_X509_CINF ,
84.Nm i2d_X509_CINF ,
85.Nm d2i_X509_VAL ,
86.Nm i2d_X509_VAL
64.Nd decode and encode X.509 certificates 87.Nd decode and encode X.509 certificates
65.Sh SYNOPSIS 88.Sh SYNOPSIS
66.In openssl/x509.h 89.In openssl/x509.h
@@ -106,6 +129,39 @@
106.Fa "X509 *val_in" 129.Fa "X509 *val_in"
107.Fa "unsigned char **der_out" 130.Fa "unsigned char **der_out"
108.Fc 131.Fc
132.Ft X509_CERT_AUX *
133.Fo d2i_X509_CERT_AUX
134.Fa "X509_CERT_AUX **val_out"
135.Fa "const unsigned char **der_in"
136.Fa "long length"
137.Fc
138.Ft int
139.Fo i2d_X509_CERT_AUX
140.Fa "X509_CERT_AUX *val_in"
141.Fa "unsigned char **der_out"
142.Fc
143.Ft X509_CINF *
144.Fo d2i_X509_CINF
145.Fa "X509_CINF **val_out"
146.Fa "const unsigned char **der_in"
147.Fa "long length"
148.Fc
149.Ft int
150.Fo i2d_X509_CINF
151.Fa "X509_CINF *val_in"
152.Fa "unsigned char **der_out"
153.Fc
154.Ft X509_VAL *
155.Fo d2i_X509_VAL
156.Fa "X509_VAL **val_out"
157.Fa "const unsigned char **der_in"
158.Fa "long length"
159.Fc
160.Ft int
161.Fo i2d_X509_VAL
162.Fa "X509_VAL *val_in"
163.Fa "unsigned char **der_out"
164.Fc
109.Sh DESCRIPTION 165.Sh DESCRIPTION
110These functions decode and encode X.509 certificates 166These functions decode and encode X.509 certificates
111and some of their substructures. 167and some of their substructures.
@@ -145,6 +201,26 @@ but the encoded output contains both the certificate and any auxiliary
145trust information. 201trust information.
146This is used by the PEM routines to write TRUSTED CERTIFICATE objects. 202This is used by the PEM routines to write TRUSTED CERTIFICATE objects.
147Note that this is a non-standard OpenSSL-specific data format. 203Note that this is a non-standard OpenSSL-specific data format.
204.Pp
205.Fn d2i_X509_CERT_AUX
206and
207.Fn i2d_X509_CERT_AUX
208decode and encode optional non-standard auxiliary data appended to
209a certificate, for example friendly alias names and trust data.
210.Pp
211.Fn d2i_X509_CINF
212and
213.Fn i2d_X509_CINF
214decode and encode an ASN.1
215.Vt TBSCertificate
216structure defined in RFC 5280 section 4.1.
217.Pp
218.Fn d2i_X509_VAL
219and
220.Fn i2d_X509_VAL
221decode and encode an ASN.1
222.Vt Validity
223structure defined in RFC 5280 section 4.1.
148.Sh RETURN VALUES 224.Sh RETURN VALUES
149.Fn d2i_X509 , 225.Fn d2i_X509 ,
150.Fn d2i_X509_bio , 226.Fn d2i_X509_bio ,
@@ -157,9 +233,25 @@ structure or
157.Dv NULL 233.Dv NULL
158if an error occurs. 234if an error occurs.
159.Pp 235.Pp
160.Fn i2d_X509 236.Fn d2i_X509_CERT_AUX ,
237.Fn d2i_X509_CINF ,
161and 238and
162.Fn i2d_X509_AUX 239.Fn d2i_X509_VAL
240return an
241.Vt X509_CERT_AUX ,
242.Vt X509_CINF ,
243or
244.Vt X509_VAL
245object, respectively, or
246.Dv NULL
247if an error occurs.
248.Pp
249.Fn i2d_X509 ,
250.Fn i2d_X509_AUX ,
251.Fn i2d_X509_CERT_AUX ,
252.Fn i2d_X509_CINF ,
253and
254.Fn i2d_X509_VAL
163return the number of bytes successfully encoded or a negative value 255return the number of bytes successfully encoded or a negative value
164if an error occurs. 256if an error occurs.
165.Pp 257.Pp
@@ -172,6 +264,7 @@ For all functions, the error code can be obtained by
172.Xr ERR_get_error 3 . 264.Xr ERR_get_error 3 .
173.Sh SEE ALSO 265.Sh SEE ALSO
174.Xr ASN1_item_d2i 3 , 266.Xr ASN1_item_d2i 3 ,
267.Xr X509_CINF_new 3 ,
175.Xr X509_new 3 268.Xr X509_new 3
176.Sh STANDARDS 269.Sh STANDARDS
177RFC 5280: Internet X.509 Public Key Infrastructure Certificate and 270RFC 5280: Internet X.509 Public Key Infrastructure Certificate and