Merge from vendor branch OPENSSL:
[dragonfly.git] / secure / usr.bin / openssl / man / ocsp.1
CommitLineData
2eaa1526 1.\" Automatically generated by Pod::Man 2.12 (Pod::Simple 3.05)
8b0cefbb
JR
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
984263bc
MD
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
8b0cefbb 13.de Sp \" Vertical space (when we can't use .PP)
984263bc
MD
14.if t .sp .5v
15.if n .sp
16..
8b0cefbb 17.de Vb \" Begin verbatim text
984263bc
MD
18.ft CW
19.nf
20.ne \\$1
21..
8b0cefbb 22.de Ve \" End verbatim text
984263bc 23.ft R
984263bc
MD
24.fi
25..
8b0cefbb
JR
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
2eaa1526
PA
28.\" double quote, and \*(R" will give a right double quote. \*(C+ will
29.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
30.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
31.\" nothing in troff, for use with C<>.
32.tr \(*W-
8b0cefbb 33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
984263bc 34.ie n \{\
8b0cefbb
JR
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
984263bc
MD
43'br\}
44.el\{\
8b0cefbb
JR
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
984263bc 49'br\}
8b0cefbb
JR
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
984263bc 58..
8b0cefbb
JR
59. nr % 0
60. rr F
984263bc 61.\}
8b0cefbb 62.\"
8b0cefbb
JR
63.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64.\" Fear. Run. Save yourself. No user-serviceable parts.
65. \" fudge factors for nroff and troff
984263bc 66.if n \{\
8b0cefbb
JR
67. ds #H 0
68. ds #V .8m
69. ds #F .3m
70. ds #[ \f1
71. ds #] \fP
984263bc
MD
72.\}
73.if t \{\
8b0cefbb
JR
74. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
75. ds #V .6m
76. ds #F 0
77. ds #[ \&
78. ds #] \&
984263bc 79.\}
8b0cefbb 80. \" simple accents for nroff and troff
984263bc 81.if n \{\
8b0cefbb
JR
82. ds ' \&
83. ds ` \&
84. ds ^ \&
85. ds , \&
86. ds ~ ~
87. ds /
984263bc
MD
88.\}
89.if t \{\
8b0cefbb
JR
90. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
91. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
92. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
93. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
94. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
95. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
984263bc 96.\}
8b0cefbb 97. \" troff and (daisy-wheel) nroff accents
984263bc
MD
98.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
99.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
100.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
101.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
102.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
103.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
104.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
105.ds ae a\h'-(\w'a'u*4/10)'e
106.ds Ae A\h'-(\w'A'u*4/10)'E
8b0cefbb 107. \" corrections for vroff
984263bc
MD
108.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
109.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
8b0cefbb 110. \" for low resolution devices (crt and lpr)
984263bc
MD
111.if \n(.H>23 .if \n(.V>19 \
112\{\
8b0cefbb
JR
113. ds : e
114. ds 8 ss
115. ds o a
116. ds d- d\h'-1'\(ga
117. ds D- D\h'-1'\(hy
118. ds th \o'bp'
119. ds Th \o'LP'
120. ds ae ae
121. ds Ae AE
984263bc
MD
122.\}
123.rm #[ #] #H #V #F C
8b0cefbb
JR
124.\" ========================================================================
125.\"
126.IX Title "OCSP 1"
2eaa1526
PA
127.TH OCSP 1 "2007-10-24" "0.9.8g" "OpenSSL"
128.\" For nroff, turn off justification. Always turn off hyphenation; it makes
129.\" way too many mistakes in technical documents.
130.if n .ad l
131.nh
984263bc
MD
132.SH "NAME"
133ocsp \- Online Certificate Status Protocol utility
134.SH "SYNOPSIS"
8b0cefbb
JR
135.IX Header "SYNOPSIS"
136\&\fBopenssl\fR \fBocsp\fR
984263bc
MD
137[\fB\-out file\fR]
138[\fB\-issuer file\fR]
139[\fB\-cert file\fR]
140[\fB\-serial n\fR]
e3cdf75b
JR
141[\fB\-signer file\fR]
142[\fB\-signkey file\fR]
143[\fB\-sign_other file\fR]
144[\fB\-no_certs\fR]
984263bc
MD
145[\fB\-req_text\fR]
146[\fB\-resp_text\fR]
147[\fB\-text\fR]
148[\fB\-reqout file\fR]
149[\fB\-respout file\fR]
150[\fB\-reqin file\fR]
151[\fB\-respin file\fR]
152[\fB\-nonce\fR]
153[\fB\-no_nonce\fR]
8b0cefbb 154[\fB\-url \s-1URL\s0\fR]
984263bc
MD
155[\fB\-host host:n\fR]
156[\fB\-path\fR]
e3cdf75b 157[\fB\-CApath dir\fR]
984263bc
MD
158[\fB\-CAfile file\fR]
159[\fB\-VAfile file\fR]
e3cdf75b
JR
160[\fB\-validity_period n\fR]
161[\fB\-status_age n\fR]
984263bc 162[\fB\-noverify\fR]
e3cdf75b 163[\fB\-verify_other file\fR]
984263bc
MD
164[\fB\-trust_other\fR]
165[\fB\-no_intern\fR]
e3cdf75b 166[\fB\-no_signature_verify\fR]
984263bc
MD
167[\fB\-no_cert_verify\fR]
168[\fB\-no_chain\fR]
169[\fB\-no_cert_checks\fR]
e3cdf75b
JR
170[\fB\-port num\fR]
171[\fB\-index file\fR]
172[\fB\-CA file\fR]
173[\fB\-rsigner file\fR]
174[\fB\-rkey file\fR]
175[\fB\-rother file\fR]
176[\fB\-resp_no_certs\fR]
177[\fB\-nmin n\fR]
178[\fB\-ndays n\fR]
179[\fB\-resp_key_id\fR]
180[\fB\-nrequest n\fR]
984263bc 181.SH "DESCRIPTION"
8b0cefbb
JR
182.IX Header "DESCRIPTION"
183The Online Certificate Status Protocol (\s-1OCSP\s0) enables applications to
184determine the (revocation) state of an identified certificate (\s-1RFC\s0 2560).
984263bc 185.PP
8b0cefbb 186The \fBocsp\fR command performs many common \s-1OCSP\s0 tasks. It can be used
984263bc 187to print out requests and responses, create requests and send queries
8b0cefbb 188to an \s-1OCSP\s0 responder and behave like a mini \s-1OCSP\s0 server itself.
984263bc 189.SH "OCSP CLIENT OPTIONS"
8b0cefbb
JR
190.IX Header "OCSP CLIENT OPTIONS"
191.IP "\fB\-out filename\fR" 4
192.IX Item "-out filename"
984263bc 193specify output filename, default is standard output.
8b0cefbb
JR
194.IP "\fB\-issuer filename\fR" 4
195.IX Item "-issuer filename"
984263bc
MD
196This specifies the current issuer certificate. This option can be used
197multiple times. The certificate specified in \fBfilename\fR must be in
8b0cefbb
JR
198\&\s-1PEM\s0 format.
199.IP "\fB\-cert filename\fR" 4
200.IX Item "-cert filename"
984263bc
MD
201Add the certificate \fBfilename\fR to the request. The issuer certificate
202is taken from the previous \fBissuer\fR option, or an error occurs if no
203issuer certificate is specified.
8b0cefbb
JR
204.IP "\fB\-serial num\fR" 4
205.IX Item "-serial num"
984263bc 206Same as the \fBcert\fR option except the certificate with serial number
8b0cefbb 207\&\fBnum\fR is added to the request. The serial number is interpreted as a
984263bc 208decimal integer unless preceded by \fB0x\fR. Negative integers can also
e3cdf75b 209be specified by preceding the value by a \fB\-\fR sign.
8b0cefbb
JR
210.IP "\fB\-signer filename\fR, \fB\-signkey filename\fR" 4
211.IX Item "-signer filename, -signkey filename"
984263bc
MD
212Sign the \s-1OCSP\s0 request using the certificate specified in the \fBsigner\fR
213option and the private key specified by the \fBsignkey\fR option. If
214the \fBsignkey\fR option is not present then the private key is read
215from the same file as the certificate. If neither option is specified then
216the \s-1OCSP\s0 request is not signed.
8b0cefbb
JR
217.IP "\fB\-sign_other filename\fR" 4
218.IX Item "-sign_other filename"
e3cdf75b 219Additional certificates to include in the signed request.
8b0cefbb
JR
220.IP "\fB\-nonce\fR, \fB\-no_nonce\fR" 4
221.IX Item "-nonce, -no_nonce"
984263bc
MD
222Add an \s-1OCSP\s0 nonce extension to a request or disable \s-1OCSP\s0 nonce addition.
223Normally if an \s-1OCSP\s0 request is input using the \fBrespin\fR option no
224nonce is added: using the \fBnonce\fR option will force addition of a nonce.
225If an \s-1OCSP\s0 request is being created (using \fBcert\fR and \fBserial\fR options)
226a nonce is automatically added specifying \fBno_nonce\fR overrides this.
8b0cefbb
JR
227.IP "\fB\-req_text\fR, \fB\-resp_text\fR, \fB\-text\fR" 4
228.IX Item "-req_text, -resp_text, -text"
984263bc 229print out the text form of the \s-1OCSP\s0 request, response or both respectively.
8b0cefbb
JR
230.IP "\fB\-reqout file\fR, \fB\-respout file\fR" 4
231.IX Item "-reqout file, -respout file"
984263bc 232write out the \s-1DER\s0 encoded certificate request or response to \fBfile\fR.
8b0cefbb
JR
233.IP "\fB\-reqin file\fR, \fB\-respin file\fR" 4
234.IX Item "-reqin file, -respin file"
984263bc
MD
235read \s-1OCSP\s0 request or response file from \fBfile\fR. These option are ignored
236if \s-1OCSP\s0 request or response creation is implied by other options (for example
237with \fBserial\fR, \fBcert\fR and \fBhost\fR options).
8b0cefbb
JR
238.IP "\fB\-url responder_url\fR" 4
239.IX Item "-url responder_url"
984263bc 240specify the responder \s-1URL\s0. Both \s-1HTTP\s0 and \s-1HTTPS\s0 (\s-1SSL/TLS\s0) URLs can be specified.
8b0cefbb
JR
241.IP "\fB\-host hostname:port\fR, \fB\-path pathname\fR" 4
242.IX Item "-host hostname:port, -path pathname"
984263bc 243if the \fBhost\fR option is present then the \s-1OCSP\s0 request is sent to the host
8b0cefbb 244\&\fBhostname\fR on port \fBport\fR. \fBpath\fR specifies the \s-1HTTP\s0 path name to use
984263bc 245or \*(L"/\*(R" by default.
8b0cefbb
JR
246.IP "\fB\-CAfile file\fR, \fB\-CApath pathname\fR" 4
247.IX Item "-CAfile file, -CApath pathname"
984263bc
MD
248file or pathname containing trusted \s-1CA\s0 certificates. These are used to verify
249the signature on the \s-1OCSP\s0 response.
8b0cefbb
JR
250.IP "\fB\-verify_other file\fR" 4
251.IX Item "-verify_other file"
984263bc
MD
252file containing additional certificates to search when attempting to locate
253the \s-1OCSP\s0 response signing certificate. Some responders omit the actual signer's
254certificate from the response: this option can be used to supply the necessary
255certificate in such cases.
8b0cefbb
JR
256.IP "\fB\-trust_other\fR" 4
257.IX Item "-trust_other"
984263bc
MD
258the certificates specified by the \fB\-verify_certs\fR option should be explicitly
259trusted and no additional checks will be performed on them. This is useful
260when the complete responder certificate chain is not available or trusting a
261root \s-1CA\s0 is not appropriate.
8b0cefbb
JR
262.IP "\fB\-VAfile file\fR" 4
263.IX Item "-VAfile file"
984263bc 264file containing explicitly trusted responder certificates. Equivalent to the
8b0cefbb
JR
265\&\fB\-verify_certs\fR and \fB\-trust_other\fR options.
266.IP "\fB\-noverify\fR" 4
267.IX Item "-noverify"
984263bc
MD
268don't attempt to verify the \s-1OCSP\s0 response signature or the nonce values. This
269option will normally only be used for debugging since it disables all verification
270of the responders certificate.
8b0cefbb
JR
271.IP "\fB\-no_intern\fR" 4
272.IX Item "-no_intern"
984263bc
MD
273ignore certificates contained in the \s-1OCSP\s0 response when searching for the
274signers certificate. With this option the signers certificate must be specified
275with either the \fB\-verify_certs\fR or \fB\-VAfile\fR options.
8b0cefbb
JR
276.IP "\fB\-no_signature_verify\fR" 4
277.IX Item "-no_signature_verify"
984263bc
MD
278don't check the signature on the \s-1OCSP\s0 response. Since this option tolerates invalid
279signatures on \s-1OCSP\s0 responses it will normally only be used for testing purposes.
8b0cefbb
JR
280.IP "\fB\-no_cert_verify\fR" 4
281.IX Item "-no_cert_verify"
984263bc
MD
282don't verify the \s-1OCSP\s0 response signers certificate at all. Since this option allows
283the \s-1OCSP\s0 response to be signed by any certificate it should only be used for
284testing purposes.
8b0cefbb
JR
285.IP "\fB\-no_chain\fR" 4
286.IX Item "-no_chain"
984263bc
MD
287do not use certificates in the response as additional untrusted \s-1CA\s0
288certificates.
8b0cefbb
JR
289.IP "\fB\-no_cert_checks\fR" 4
290.IX Item "-no_cert_checks"
984263bc
MD
291don't perform any additional checks on the \s-1OCSP\s0 response signers certificate.
292That is do not make any checks to see if the signers certificate is authorised
293to provide the necessary status information: as a result this option should
294only be used for testing purposes.
8b0cefbb
JR
295.IP "\fB\-validity_period nsec\fR, \fB\-status_age age\fR" 4
296.IX Item "-validity_period nsec, -status_age age"
984263bc
MD
297these options specify the range of times, in seconds, which will be tolerated
298in an \s-1OCSP\s0 response. Each certificate status response includes a \fBnotBefore\fR time and
299an optional \fBnotAfter\fR time. The current time should fall between these two values, but
300the interval between the two times may be only a few seconds. In practice the \s-1OCSP\s0
301responder and clients clocks may not be precisely synchronised and so such a check
302may fail. To avoid this the \fB\-validity_period\fR option can be used to specify an
303acceptable error range in seconds, the default value is 5 minutes.
304.Sp
305If the \fBnotAfter\fR time is omitted from a response then this means that new status
306information is immediately available. In this case the age of the \fBnotBefore\fR field
307is checked to see it is not older than \fBage\fR seconds old. By default this additional
308check is not performed.
309.SH "OCSP SERVER OPTIONS"
8b0cefbb
JR
310.IX Header "OCSP SERVER OPTIONS"
311.IP "\fB\-index indexfile\fR" 4
312.IX Item "-index indexfile"
313\&\fBindexfile\fR is a text index file in \fBca\fR format containing certificate revocation
984263bc
MD
314information.
315.Sp
316If the \fBindex\fR option is specified the \fBocsp\fR utility is in responder mode, otherwise
8b0cefbb 317it is in client mode. The request(s) the responder processes can be either specified on
984263bc 318the command line (using \fBissuer\fR and \fBserial\fR options), supplied in a file (using the
8b0cefbb 319\&\fBrespin\fR option) or via external \s-1OCSP\s0 clients (if \fBport\fR or \fBurl\fR is specified).
984263bc
MD
320.Sp
321If the \fBindex\fR option is present then the \fB\s-1CA\s0\fR and \fBrsigner\fR options must also be
322present.
8b0cefbb
JR
323.IP "\fB\-CA file\fR" 4
324.IX Item "-CA file"
325\&\s-1CA\s0 certificate corresponding to the revocation information in \fBindexfile\fR.
326.IP "\fB\-rsigner file\fR" 4
327.IX Item "-rsigner file"
984263bc 328The certificate to sign \s-1OCSP\s0 responses with.
8b0cefbb
JR
329.IP "\fB\-rother file\fR" 4
330.IX Item "-rother file"
984263bc 331Additional certificates to include in the \s-1OCSP\s0 response.
8b0cefbb
JR
332.IP "\fB\-resp_no_certs\fR" 4
333.IX Item "-resp_no_certs"
984263bc 334Don't include any certificates in the \s-1OCSP\s0 response.
8b0cefbb
JR
335.IP "\fB\-resp_key_id\fR" 4
336.IX Item "-resp_key_id"
984263bc 337Identify the signer certificate using the key \s-1ID\s0, default is to use the subject name.
8b0cefbb
JR
338.IP "\fB\-rkey file\fR" 4
339.IX Item "-rkey file"
984263bc 340The private key to sign \s-1OCSP\s0 responses with: if not present the file specified in the
8b0cefbb
JR
341\&\fBrsigner\fR option is used.
342.IP "\fB\-port portnum\fR" 4
343.IX Item "-port portnum"
984263bc
MD
344Port to listen for \s-1OCSP\s0 requests on. The port may also be specified using the \fBurl\fR
345option.
8b0cefbb
JR
346.IP "\fB\-nrequest number\fR" 4
347.IX Item "-nrequest number"
2eaa1526 348The \s-1OCSP\s0 server will exit after receiving \fBnumber\fR requests, default unlimited.
8b0cefbb
JR
349.IP "\fB\-nmin minutes\fR, \fB\-ndays days\fR" 4
350.IX Item "-nmin minutes, -ndays days"
984263bc 351Number of minutes or days when fresh revocation information is available: used in the
8b0cefbb 352\&\fBnextUpdate\fR field. If neither option is present then the \fBnextUpdate\fR field is
984263bc
MD
353omitted meaning fresh revocation information is immediately available.
354.SH "OCSP Response verification."
8b0cefbb
JR
355.IX Header "OCSP Response verification."
356\&\s-1OCSP\s0 Response follows the rules specified in \s-1RFC2560\s0.
984263bc 357.PP
8b0cefbb
JR
358Initially the \s-1OCSP\s0 responder certificate is located and the signature on
359the \s-1OCSP\s0 request checked using the responder certificate's public key.
984263bc 360.PP
8b0cefbb 361Then a normal certificate verify is performed on the \s-1OCSP\s0 responder certificate
984263bc
MD
362building up a certificate chain in the process. The locations of the trusted
363certificates used to build the chain can be specified by the \fBCAfile\fR
364and \fBCApath\fR options or they will be looked for in the standard OpenSSL
365certificates directory.
366.PP
8b0cefbb 367If the initial verify fails then the \s-1OCSP\s0 verify process halts with an
984263bc
MD
368error.
369.PP
8b0cefbb
JR
370Otherwise the issuing \s-1CA\s0 certificate in the request is compared to the \s-1OCSP\s0
371responder certificate: if there is a match then the \s-1OCSP\s0 verify succeeds.
984263bc 372.PP
8b0cefbb
JR
373Otherwise the \s-1OCSP\s0 responder certificate's \s-1CA\s0 is checked against the issuing
374\&\s-1CA\s0 certificate in the request. If there is a match and the OCSPSigning
375extended key usage is present in the \s-1OCSP\s0 responder certificate then the
376\&\s-1OCSP\s0 verify succeeds.
984263bc 377.PP
8b0cefbb
JR
378Otherwise the root \s-1CA\s0 of the \s-1OCSP\s0 responders \s-1CA\s0 is checked to see if it
379is trusted for \s-1OCSP\s0 signing. If it is the \s-1OCSP\s0 verify succeeds.
984263bc 380.PP
8b0cefbb 381If none of these checks is successful then the \s-1OCSP\s0 verify fails.
984263bc 382.PP
8b0cefbb
JR
383What this effectively means if that if the \s-1OCSP\s0 responder certificate is
384authorised directly by the \s-1CA\s0 it is issuing revocation information about
984263bc
MD
385(and it is correctly configured) then verification will succeed.
386.PP
8b0cefbb 387If the \s-1OCSP\s0 responder is a \*(L"global responder\*(R" which can give details about
984263bc 388multiple CAs and has its own separate certificate chain then its root
8b0cefbb 389\&\s-1CA\s0 can be trusted for \s-1OCSP\s0 signing. For example:
984263bc
MD
390.PP
391.Vb 1
2eaa1526 392\& openssl x509 \-in ocspCA.pem \-addtrust OCSPSigning \-out trustedCA.pem
984263bc 393.Ve
8b0cefbb 394.PP
984263bc
MD
395Alternatively the responder certificate itself can be explicitly trusted
396with the \fB\-VAfile\fR option.
397.SH "NOTES"
8b0cefbb 398.IX Header "NOTES"
984263bc 399As noted, most of the verify options are for testing or debugging purposes.
8b0cefbb
JR
400Normally only the \fB\-CApath\fR, \fB\-CAfile\fR and (if the responder is a 'global
401\&\s-1VA\s0') \fB\-VAfile\fR options need to be used.
984263bc 402.PP
8b0cefbb
JR
403The \s-1OCSP\s0 server is only useful for test and demonstration purposes: it is
404not really usable as a full \s-1OCSP\s0 responder. It contains only a very
405simple \s-1HTTP\s0 request handling and can only handle the \s-1POST\s0 form of \s-1OCSP\s0
984263bc
MD
406queries. It also handles requests serially meaning it cannot respond to
407new requests until it has processed the current one. The text index file
408format of revocation is also inefficient for large quantities of revocation
409data.
410.PP
8b0cefbb 411It is possible to run the \fBocsp\fR application in responder mode via a \s-1CGI\s0
984263bc
MD
412script using the \fBrespin\fR and \fBrespout\fR options.
413.SH "EXAMPLES"
8b0cefbb
JR
414.IX Header "EXAMPLES"
415Create an \s-1OCSP\s0 request and write it to a file:
984263bc
MD
416.PP
417.Vb 1
2eaa1526 418\& openssl ocsp \-issuer issuer.pem \-cert c1.pem \-cert c2.pem \-reqout req.der
984263bc 419.Ve
8b0cefbb
JR
420.PP
421Send a query to an \s-1OCSP\s0 responder with \s-1URL\s0 http://ocsp.myhost.com/ save the
984263bc
MD
422response to a file and print it out in text form
423.PP
424.Vb 2
2eaa1526
PA
425\& openssl ocsp \-issuer issuer.pem \-cert c1.pem \-cert c2.pem \e
426\& \-url http://ocsp.myhost.com/ \-resp_text \-respout resp.der
984263bc 427.Ve
8b0cefbb
JR
428.PP
429Read in an \s-1OCSP\s0 response and print out text form:
984263bc
MD
430.PP
431.Vb 1
2eaa1526 432\& openssl ocsp \-respin resp.der \-text
984263bc 433.Ve
8b0cefbb
JR
434.PP
435\&\s-1OCSP\s0 server on port 8888 using a standard \fBca\fR configuration, and a separate
984263bc
MD
436responder certificate. All requests and responses are printed to a file.
437.PP
438.Vb 2
2eaa1526
PA
439\& openssl ocsp \-index demoCA/index.txt \-port 8888 \-rsigner rcert.pem \-CA demoCA/cacert.pem
440\& \-text \-out log.txt
984263bc 441.Ve
8b0cefbb 442.PP
984263bc
MD
443As above but exit after processing one request:
444.PP
445.Vb 2
2eaa1526
PA
446\& openssl ocsp \-index demoCA/index.txt \-port 8888 \-rsigner rcert.pem \-CA demoCA/cacert.pem
447\& \-nrequest 1
984263bc 448.Ve
8b0cefbb 449.PP
984263bc
MD
450Query status information using internally generated request:
451.PP
452.Vb 2
2eaa1526
PA
453\& openssl ocsp \-index demoCA/index.txt \-rsigner rcert.pem \-CA demoCA/cacert.pem
454\& \-issuer demoCA/cacert.pem \-serial 1
984263bc 455.Ve
8b0cefbb 456.PP
984263bc
MD
457Query status information using request read from a file, write response to a
458second file.
459.PP
460.Vb 2
2eaa1526
PA
461\& openssl ocsp \-index demoCA/index.txt \-rsigner rcert.pem \-CA demoCA/cacert.pem
462\& \-reqin req.der \-respout resp.der
984263bc 463.Ve