summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2016-12-28 15:18:05 +0000
committerschwarze <>2016-12-28 15:18:05 +0000
commit6aaedcf4c1e5ca90aeb0a1809fc4776830faa3a6 (patch)
tree1071feef03a45018a59f159966c6c20b42596682
parentdb6ef057b43b286073dc7b55a1490005b3bf9949 (diff)
downloadopenbsd-6aaedcf4c1e5ca90aeb0a1809fc4776830faa3a6.tar.gz
openbsd-6aaedcf4c1e5ca90aeb0a1809fc4776830faa3a6.tar.bz2
openbsd-6aaedcf4c1e5ca90aeb0a1809fc4776830faa3a6.zip
Rewrite and add d2i_X509_REQ_INFO(3) and i2d_X509_REQ_INFO(3),
both listed in <openssl/x509.h> and in OpenSSL doc/man3/d2i_X509.pod.
-rw-r--r--src/lib/libcrypto/man/d2i_X509_REQ.3165
1 files changed, 99 insertions, 66 deletions
diff --git a/src/lib/libcrypto/man/d2i_X509_REQ.3 b/src/lib/libcrypto/man/d2i_X509_REQ.3
index 6c4a61985e..e3e537fb51 100644
--- a/src/lib/libcrypto/man/d2i_X509_REQ.3
+++ b/src/lib/libcrypto/man/d2i_X509_REQ.3
@@ -1,55 +1,21 @@
1.\" $OpenBSD: d2i_X509_REQ.3,v 1.4 2016/12/08 20:22:08 jmc Exp $ 1.\" $OpenBSD: d2i_X509_REQ.3,v 1.5 2016/12/28 15:18:05 schwarze Exp $
2.\" OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400 2.\" OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
5.\" Copyright (c) 2002, 2005, 2009, 2015 The OpenSSL Project.
6.\" All rights reserved.
7.\" 5.\"
8.\" Redistribution and use in source and binary forms, with or without 6.\" Permission to use, copy, modify, and distribute this software for any
9.\" modification, are permitted provided that the following conditions 7.\" purpose with or without fee is hereby granted, provided that the above
10.\" are met: 8.\" copyright notice and this permission notice appear in all copies.
11.\" 9.\"
12.\" 1. Redistributions of source code must retain the above copyright 10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13.\" notice, this list of conditions and the following disclaimer. 11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14.\" 17.\"
15.\" 2. Redistributions in binary form must reproduce the above copyright 18.Dd $Mdocdate: December 28 2016 $
16.\" notice, this list of conditions and the following disclaimer in
17.\" the documentation and/or other materials provided with the
18.\" distribution.
19.\"
20.\" 3. All advertising materials mentioning features or use of this
21.\" software must display the following acknowledgment:
22.\" "This product includes software developed by the OpenSSL Project
23.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24.\"
25.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26.\" endorse or promote products derived from this software without
27.\" prior written permission. For written permission, please contact
28.\" openssl-core@openssl.org.
29.\"
30.\" 5. Products derived from this software may not be called "OpenSSL"
31.\" nor may "OpenSSL" appear in their names without prior written
32.\" permission of the OpenSSL Project.
33.\"
34.\" 6. Redistributions of any form whatsoever must retain the following
35.\" acknowledgment:
36.\" "This product includes software developed by the OpenSSL Project
37.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
38.\"
39.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
40.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
43.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
48.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\"
52.Dd $Mdocdate: December 8 2016 $
53.Dt D2I_X509_REQ 3 19.Dt D2I_X509_REQ 3
54.Os 20.Os
55.Sh NAME 21.Sh NAME
@@ -58,46 +24,113 @@
58.Nm d2i_X509_REQ_bio , 24.Nm d2i_X509_REQ_bio ,
59.Nm d2i_X509_REQ_fp , 25.Nm d2i_X509_REQ_fp ,
60.Nm i2d_X509_REQ_bio , 26.Nm i2d_X509_REQ_bio ,
61.Nm i2d_X509_REQ_fp 27.Nm i2d_X509_REQ_fp ,
62.Nd PKCS#10 certificate request functions 28.Nm d2i_X509_REQ_INFO ,
29.Nm i2d_X509_REQ_INFO
30.Nd decode and encode PKCS#10 certification requests
63.Sh SYNOPSIS 31.Sh SYNOPSIS
64.In openssl/x509.h 32.In openssl/x509.h
65.Ft X509_REQ * 33.Ft X509_REQ *
66.Fo d2i_X509_REQ 34.Fo d2i_X509_REQ
67.Fa "X509_REQ **a" 35.Fa "X509_REQ **val_out"
68.Fa "const unsigned char **pp" 36.Fa "const unsigned char **der_in"
69.Fa "long length" 37.Fa "long length"
70.Fc 38.Fc
71.Ft int 39.Ft int
72.Fo i2d_X509_REQ 40.Fo i2d_X509_REQ
73.Fa "X509_REQ *a" 41.Fa "X509_REQ *val_in"
74.Fa "unsigned char **pp" 42.Fa "unsigned char **der_out"
75.Fc 43.Fc
76.Ft X509_REQ * 44.Ft X509_REQ *
77.Fo d2i_X509_REQ_bio 45.Fo d2i_X509_REQ_bio
78.Fa "BIO *bp" 46.Fa "BIO *in_bio"
79.Fa "X509_REQ **x" 47.Fa "X509_REQ **val_out"
80.Fc 48.Fc
81.Ft X509_REQ * 49.Ft X509_REQ *
82.Fo d2i_X509_REQ_fp 50.Fo d2i_X509_REQ_fp
83.Fa "FILE *fp" 51.Fa "FILE *in_fp"
84.Fa "X509_REQ **x" 52.Fa "X509_REQ **val_out"
85.Fc 53.Fc
86.Ft int 54.Ft int
87.Fo i2d_X509_REQ_bio 55.Fo i2d_X509_REQ_bio
88.Fa "BIO *bp" 56.Fa "BIO *out_bio"
89.Fa "X509_REQ *x" 57.Fa "X509_REQ *val_in"
90.Fc 58.Fc
91.Ft int 59.Ft int
92.Fo i2d_X509_REQ_fp 60.Fo i2d_X509_REQ_fp
93.Fa "FILE *fp" 61.Fa "FILE *out_fp"
94.Fa "X509_REQ *x" 62.Fa "X509_REQ *val_in"
63.Fc
64.Ft X509_REQ_INFO *
65.Fo d2i_X509_REQ_INFO
66.Fa "X509_REQ_INFO **val_out"
67.Fa "const unsigned char **der_in"
68.Fa "long length"
69.Fc
70.Ft int
71.Fo i2d_X509_REQ_INFO
72.Fa "X509_REQ_INFO *val_in"
73.Fa "unsigned char **der_out"
95.Fc 74.Fc
96.Sh DESCRIPTION 75.Sh DESCRIPTION
97These functions decode and encode a PKCS#10 certificate request. 76These functions decode and encode PKCS#10 certification requests.
98They otherwise behave in a way similar to 77For details about the semantics, examples, caveats, and bugs, see
99.Xr d2i_X509 3 78.Xr ASN1_item_d2i 3 .
79.Pp
80.Fn d2i_X509_REQ
81and
82.Fn i2d_X509_REQ
83decode and encode an ASN.1
84.Vt CertificationRequest
85structure defined in RFC 2986 section 4.2.
86.Fn d2i_X509_REQ_bio ,
87.Fn d2i_X509_REQ_fp ,
88.Fn i2d_X509_REQ_bio ,
89and
90.Fn i2d_X509_REQ_fp
91are similar except that they decode or encode using a
92.Vt BIO
93or
94.Vt FILE
95pointer.
96.Pp
97.Fn d2i_X509_REQ_INFO
98and
99.Fn i2d_X509_REQ_INFO
100decode and encode an ASN.1
101.Vt CertificationRequestInfo
102structure defined in RFC 2986 section 4.1.
103.Sh RETURN VALUES
104.Fn d2i_X509_REQ ,
105.Fn d2i_X509_REQ_bio ,
106and
107.Fn d2i_X509_REQ_fp
108return an
109.Vt X509_REQ
110object or
111.Dv NULL
112if an error occurs.
113.Pp
114.Fn d2i_X509_REQ_INFO
115returns an
116.Vt X509_REQ_INFO
117object or
118.Dv NULL
119if an error occurs.
120.Pp
121.Fn i2d_X509_REQ
122and
123.Fn i2d_X509_REQ_INFO
124return the number of bytes successfully encoded or a negative value
125if an error occurs.
126.Pp
127.Fn i2d_X509_REQ_bio
100and 128and
101.Xr i2d_X509 3 . 129.Fn i2d_X509_REQ_fp
130return 1 for success or 0 if an error occurs.
102.Sh SEE ALSO 131.Sh SEE ALSO
103.Xr d2i_X509 3 132.Xr ASN1_item_d2i 3 ,
133.Xr PEM_read_X509_REQ 3 ,
134.Xr X509_REQ_new 3
135.Sh STANDARDS
136RFC 2986: PKCS #10: Certification Request Syntax Specification