summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2016-12-12 18:45:29 +0000
committerschwarze <>2016-12-12 18:45:29 +0000
commitad66f778ac030fef08a6451194211724a877f664 (patch)
treeadefe797a9057c978c1732a6bf1a8604178f087a
parent064fee43db3ba4e7e7f0c0f473474749e1383687 (diff)
downloadopenbsd-ad66f778ac030fef08a6451194211724a877f664.tar.gz
openbsd-ad66f778ac030fef08a6451194211724a877f664.tar.bz2
openbsd-ad66f778ac030fef08a6451194211724a877f664.zip
Document OCSP_RESPONSE_new(3), OCSP_RESPONSE_free(3),
OCSP_RESPBYTES_new(3), OCSP_RESPBYTES_free(3), OCSP_BASICRESP_new(3), OCSP_BASICRESP_free(3), OCSP_RESPDATA_new(3), OCSP_RESPDATA_free(3), OCSP_RESPID_new(3), and OCSP_RESPID_free(3), all in <openssl/ocsp.h> and in OpenSSL doc/man3/X509_dup.pod. Note that the OpenSSL documentation specifies the wrong header file. Add some information about what these objects actually represent, along with the pertinent STANDARDS reference. Sort functions into a logical order and apply minor wording tweaks.
-rw-r--r--src/lib/libcrypto/man/OCSP_response_status.3180
1 files changed, 144 insertions, 36 deletions
diff --git a/src/lib/libcrypto/man/OCSP_response_status.3 b/src/lib/libcrypto/man/OCSP_response_status.3
index b81c2102da..33a9dfb1a2 100644
--- a/src/lib/libcrypto/man/OCSP_response_status.3
+++ b/src/lib/libcrypto/man/OCSP_response_status.3
@@ -1,7 +1,24 @@
1.\" $OpenBSD: OCSP_response_status.3,v 1.2 2016/12/06 14:54:55 schwarze Exp $ 1.\" $OpenBSD: OCSP_response_status.3,v 1.3 2016/12/12 18:45:29 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.\" 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) 2014, 2016 The OpenSSL Project. All rights reserved. 22.\" Copyright (c) 2014, 2016 The OpenSSL Project. All rights reserved.
6.\" 23.\"
7.\" Redistribution and use in source and binary forms, with or without 24.\" Redistribution and use in source and binary forms, with or without
@@ -48,39 +65,122 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 65.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 66.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 67.\"
51.Dd $Mdocdate: December 6 2016 $ 68.Dd $Mdocdate: December 12 2016 $
52.Dt OCSP_RESPONSE_STATUS 3 69.Dt OCSP_RESPONSE_STATUS 3
53.Os 70.Os
54.Sh NAME 71.Sh NAME
55.Nm OCSP_response_status , 72.Nm OCSP_RESPONSE_new ,
56.Nm OCSP_response_get1_basic , 73.Nm OCSP_RESPONSE_free ,
74.Nm OCSP_RESPBYTES_new ,
75.Nm OCSP_RESPBYTES_free ,
76.Nm OCSP_BASICRESP_new ,
77.Nm OCSP_BASICRESP_free ,
78.Nm OCSP_RESPDATA_new ,
79.Nm OCSP_RESPDATA_free ,
80.Nm OCSP_RESPID_new ,
81.Nm OCSP_RESPID_free ,
57.Nm OCSP_response_create , 82.Nm OCSP_response_create ,
58.Nm OCSP_RESPONSE_free 83.Nm OCSP_response_status ,
84.Nm OCSP_response_get1_basic
59.Nd OCSP response functions 85.Nd OCSP response functions
60.Sh SYNOPSIS 86.Sh SYNOPSIS
61.In openssl/ocsp.h 87.In openssl/ocsp.h
62.Ft int 88.Ft OCSP_RESPONSE *
63.Fo OCSP_response_status 89.Fn OCSP_RESPONSE_new void
64.Fa "OCSP_RESPONSE *resp" 90.Ft void
65.Fc 91.Fn OCSP_RESPONSE_free "OCSP_RESPONSE *resp"
92.Ft OCSP_RESPBYTES *
93.Fn OCSP_RESPBYTES_new void
94.Ft void
95.Fn OCSP_RESPBYTES_free "OCSP_RESPBYTES *respbytes"
66.Ft OCSP_BASICRESP * 96.Ft OCSP_BASICRESP *
67.Fo OCSP_response_get1_basic 97.Fn OCSP_BASICRESP_new void
68.Fa "OCSP_RESPONSE *resp" 98.Ft void
69.Fc 99.Fn OCSP_BASICRESP_free "OCSP_BASICRESP *bs"
100.Ft OCSP_RESPDATA *
101.Fn OCSP_RESPDATA_new void
102.Ft void
103.Fn OCSP_RESPDATA_free "OCSP_RESPDATA *respdata"
104.Ft OCSP_RESPID *
105.Fn OCSP_RESPID_new void
106.Ft void
107.Fn OCSP_RESPID_free "OCSP_RESPID *respid"
70.Ft OCSP_RESPONSE * 108.Ft OCSP_RESPONSE *
71.Fo OCSP_response_create 109.Fo OCSP_response_create
72.Fa "int status" 110.Fa "int status"
73.Fa "OCSP_BASICRESP *bs" 111.Fa "OCSP_BASICRESP *bs"
74.Fc 112.Fc
75.Ft void 113.Ft int
76.Fo OCSP_RESPONSE_free 114.Fo OCSP_response_status
115.Fa "OCSP_RESPONSE *resp"
116.Fc
117.Ft OCSP_BASICRESP *
118.Fo OCSP_response_get1_basic
77.Fa "OCSP_RESPONSE *resp" 119.Fa "OCSP_RESPONSE *resp"
78.Fc 120.Fc
79.Sh DESCRIPTION 121.Sh DESCRIPTION
122.Fn OCSP_RESPONSE_new
123allocates and initializes an empty
124.Vt OCSP_RESPONSE
125object, representing an ASN.1 OCSPResponse structure defined in RFC 6960.
126.Fn OCSP_RESPONSE_free
127frees
128.Fa resp .
129.Pp
130.Fn OCSP_RESPBYTES_new
131allocates and initializes an empty
132.Vt OCSP_RESPBYTES
133object, representing an ASN.1 ResponseBytes structure defined in RFC 6960.
134Such an object is used inside
135.Vt OCSP_RESPONSE .
136.Fn OCSP_RESPBYTES_free
137frees
138.Fa respbytes .
139.Pp
140.Fn OCSP_BASICRESP_new
141allocates and initializes an empty
142.Vt OCSP_BASICRESP
143object, representing an ASN.1 BasicOCSPResponse structure defined in RFC 6960.
144.Vt OCSP_RESPBYTES
145contains the DER-encoded form of an
146.Vt OCSP_BASICRESP
147object.
148.Fn OCSP_BASICRESP_free
149frees
150.Fa bs .
151.Pp
152.Fn OCSP_RESPDATA_new
153allocates and initializes an empty
154.Vt OCSP_RESPDATA
155object, representing an ASN.1 ResponseData structure defined in RFC 6960.
156Such an object is used inside
157.Vt OCSP_BASICRESP .
158.Fn OCSP_RESPDATA_free
159frees
160.Fa respdata .
161.Pp
162.Fn OCSP_RESPID_new
163allocates and initializes an empty
164.Vt OCSP_RESPID
165object, representing an ASN.1 ResponderID structure defined in RFC 6960.
166Such an object is used inside
167.Vt OCSP_RESPDATA .
168.Fn OCSP_RESPID_free
169frees
170.Fa respid .
171.Pp
172.Fn OCSP_response_create
173creates an
174.Vt OCSP_RESPONSE
175object for
176.Fa status
177and optionally including the basic response
178.Fa bs .
179.Pp
80.Fn OCSP_response_status 180.Fn OCSP_response_status
81returns the OCSP response status of 181returns the OCSP response status of
82.Fa resp . 182.Fa resp .
83It returns one of the values: 183It returns one of the values
84.Dv OCSP_RESPONSE_STATUS_SUCCESSFUL , 184.Dv OCSP_RESPONSE_STATUS_SUCCESSFUL ,
85.Dv OCSP_RESPONSE_STATUS_MALFORMEDREQUEST , 185.Dv OCSP_RESPONSE_STATUS_MALFORMEDREQUEST ,
86.Dv OCSP_RESPONSE_STATUS_INTERNALERROR , 186.Dv OCSP_RESPONSE_STATUS_INTERNALERROR ,
@@ -92,42 +192,50 @@ or
92.Fn OCSP_response_get1_basic 192.Fn OCSP_response_get1_basic
93decodes and returns the 193decodes and returns the
94.Vt OCSP_BASICRESP 194.Vt OCSP_BASICRESP
95structure contained in 195object contained in
96.Fa resp . 196.Fa resp .
97It is only called if the status of a response is 197It is only called if the status of a response is
98.Dv OCSP_RESPONSE_STATUS_SUCCESSFUL . 198.Dv OCSP_RESPONSE_STATUS_SUCCESSFUL .
99.Pp 199.Sh RETURN VALUES
200.Fn OCSP_RESPONSE_new
201and
100.Fn OCSP_response_create 202.Fn OCSP_response_create
101creates and returns an 203return a pointer to an
102.Vt OCSP_RESPONSE 204.Vt OCSP_RESPONSE
103structure for 205object or
104.Fa status 206.Dv NULL
105and optionally including basic response 207if an error occurred.
106.Fa bs .
107.Pp
108.Fn OCSP_RESPONSE_free
109frees up OCSP response
110.Fa resp .
111.Sh RETURN VALUES
112.Fn OCSP_response_status
113returns a status value.
114.Pp 208.Pp
209.Fn OCSP_BASICRESP_new
210and
115.Fn OCSP_response_get1_basic 211.Fn OCSP_response_get1_basic
116returns an 212return a pointer to an
117.Vt OCSP_BASICRESP 213.Vt OCSP_BASICRESP
118structure pointer or 214object or
119.Dv NULL 215.Dv NULL
120if an error occurred. 216if an error occurred.
121.Pp 217.Pp
122.Fn OCSP_response_create 218.Fn OCSP_RESPBYTES_new ,
123returns an 219.Fn OCSP_RESPDATA_new ,
124.Vt OCSP_RESPONSE 220and
125structure pointer or 221.Fn OCSP_RESPID_new
222return a pointer to an empty
223.Vt OCSP_RESPBYTES ,
224.Vt OCSP_RESPDATA ,
225or
226.Vt OCSP_RESPID
227object, respectively, or
126.Dv NULL 228.Dv NULL
127if an error occurred. 229if an error occurred.
230.Pp
231.Fn OCSP_response_status
232returns a status value.
128.Sh SEE ALSO 233.Sh SEE ALSO
129.Xr OCSP_cert_to_id 3 , 234.Xr OCSP_cert_to_id 3 ,
130.Xr OCSP_request_add1_nonce 3 , 235.Xr OCSP_request_add1_nonce 3 ,
131.Xr OCSP_REQUEST_new 3 , 236.Xr OCSP_REQUEST_new 3 ,
132.Xr OCSP_resp_find_status 3 , 237.Xr OCSP_resp_find_status 3 ,
133.Xr OCSP_sendreq_new 3 238.Xr OCSP_sendreq_new 3
239.Sh STANDARDS
240RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
241Status Protocol, section 4.2: Response Syntax