]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/usr.bin/openssl/man/ocsp.1
Copy googletest 1.8.1 from ^/vendor/google/googletest/1.8.1 to .../contrib/googletest
[FreeBSD/FreeBSD.git] / secure / usr.bin / openssl / man / ocsp.1
1 .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .if !\nF .nr F 0
58 .if \nF>0 \{\
59 .    de IX
60 .    tm Index:\\$1\t\\n%\t"\\$2"
61 ..
62 .    if !\nF==2 \{\
63 .        nr % 0
64 .        nr F 2
65 .    \}
66 .\}
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "OCSP 1"
132 .TH OCSP 1 "2018-11-20" "1.1.1a" "OpenSSL"
133 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
134 .\" way too many mistakes in technical documents.
135 .if n .ad l
136 .nh
137 .SH "NAME"
138 openssl\-ocsp, ocsp \- Online Certificate Status Protocol utility
139 .SH "SYNOPSIS"
140 .IX Header "SYNOPSIS"
141 \&\fBopenssl\fR \fBocsp\fR
142 [\fB\-help\fR]
143 [\fB\-out file\fR]
144 [\fB\-issuer file\fR]
145 [\fB\-cert file\fR]
146 [\fB\-serial n\fR]
147 [\fB\-signer file\fR]
148 [\fB\-signkey file\fR]
149 [\fB\-sign_other file\fR]
150 [\fB\-no_certs\fR]
151 [\fB\-req_text\fR]
152 [\fB\-resp_text\fR]
153 [\fB\-text\fR]
154 [\fB\-reqout file\fR]
155 [\fB\-respout file\fR]
156 [\fB\-reqin file\fR]
157 [\fB\-respin file\fR]
158 [\fB\-nonce\fR]
159 [\fB\-no_nonce\fR]
160 [\fB\-url \s-1URL\s0\fR]
161 [\fB\-host host:port\fR]
162 [\fB\-multi process-count\fR]
163 [\fB\-header\fR]
164 [\fB\-path\fR]
165 [\fB\-CApath dir\fR]
166 [\fB\-CAfile file\fR]
167 [\fB\-no\-CAfile\fR]
168 [\fB\-no\-CApath\fR]
169 [\fB\-attime timestamp\fR]
170 [\fB\-check_ss_sig\fR]
171 [\fB\-crl_check\fR]
172 [\fB\-crl_check_all\fR]
173 [\fB\-explicit_policy\fR]
174 [\fB\-extended_crl\fR]
175 [\fB\-ignore_critical\fR]
176 [\fB\-inhibit_any\fR]
177 [\fB\-inhibit_map\fR]
178 [\fB\-no_check_time\fR]
179 [\fB\-partial_chain\fR]
180 [\fB\-policy arg\fR]
181 [\fB\-policy_check\fR]
182 [\fB\-policy_print\fR]
183 [\fB\-purpose purpose\fR]
184 [\fB\-suiteB_128\fR]
185 [\fB\-suiteB_128_only\fR]
186 [\fB\-suiteB_192\fR]
187 [\fB\-trusted_first\fR]
188 [\fB\-no_alt_chains\fR]
189 [\fB\-use_deltas\fR]
190 [\fB\-auth_level num\fR]
191 [\fB\-verify_depth num\fR]
192 [\fB\-verify_email email\fR]
193 [\fB\-verify_hostname hostname\fR]
194 [\fB\-verify_ip ip\fR]
195 [\fB\-verify_name name\fR]
196 [\fB\-x509_strict\fR]
197 [\fB\-VAfile file\fR]
198 [\fB\-validity_period n\fR]
199 [\fB\-status_age n\fR]
200 [\fB\-noverify\fR]
201 [\fB\-verify_other file\fR]
202 [\fB\-trust_other\fR]
203 [\fB\-no_intern\fR]
204 [\fB\-no_signature_verify\fR]
205 [\fB\-no_cert_verify\fR]
206 [\fB\-no_chain\fR]
207 [\fB\-no_cert_checks\fR]
208 [\fB\-no_explicit\fR]
209 [\fB\-port num\fR]
210 [\fB\-ignore_err\fR]
211 [\fB\-index file\fR]
212 [\fB\-CA file\fR]
213 [\fB\-rsigner file\fR]
214 [\fB\-rkey file\fR]
215 [\fB\-rother file\fR]
216 [\fB\-rsigopt nm:v\fR]
217 [\fB\-resp_no_certs\fR]
218 [\fB\-nmin n\fR]
219 [\fB\-ndays n\fR]
220 [\fB\-resp_key_id\fR]
221 [\fB\-nrequest n\fR]
222 [\fB\-\f(BIdigest\fB\fR]
223 .SH "DESCRIPTION"
224 .IX Header "DESCRIPTION"
225 The Online Certificate Status Protocol (\s-1OCSP\s0) enables applications to
226 determine the (revocation) state of an identified certificate (\s-1RFC 2560\s0).
227 .PP
228 The \fBocsp\fR command performs many common \s-1OCSP\s0 tasks. It can be used
229 to print out requests and responses, create requests and send queries
230 to an \s-1OCSP\s0 responder and behave like a mini \s-1OCSP\s0 server itself.
231 .SH "OPTIONS"
232 .IX Header "OPTIONS"
233 This command operates as either a client or a server.
234 The options are described below, divided into those two modes.
235 .SS "\s-1OCSP\s0 Client Options"
236 .IX Subsection "OCSP Client Options"
237 .IP "\fB\-help\fR" 4
238 .IX Item "-help"
239 Print out a usage message.
240 .IP "\fB\-out filename\fR" 4
241 .IX Item "-out filename"
242 specify output filename, default is standard output.
243 .IP "\fB\-issuer filename\fR" 4
244 .IX Item "-issuer filename"
245 This specifies the current issuer certificate. This option can be used
246 multiple times. The certificate specified in \fBfilename\fR must be in
247 \&\s-1PEM\s0 format. This option \fB\s-1MUST\s0\fR come before any \fB\-cert\fR options.
248 .IP "\fB\-cert filename\fR" 4
249 .IX Item "-cert filename"
250 Add the certificate \fBfilename\fR to the request. The issuer certificate
251 is taken from the previous \fBissuer\fR option, or an error occurs if no
252 issuer certificate is specified.
253 .IP "\fB\-serial num\fR" 4
254 .IX Item "-serial num"
255 Same as the \fBcert\fR option except the certificate with serial number
256 \&\fBnum\fR is added to the request. The serial number is interpreted as a
257 decimal integer unless preceded by \fB0x\fR. Negative integers can also
258 be specified by preceding the value by a \fB\-\fR sign.
259 .IP "\fB\-signer filename\fR, \fB\-signkey filename\fR" 4
260 .IX Item "-signer filename, -signkey filename"
261 Sign the \s-1OCSP\s0 request using the certificate specified in the \fBsigner\fR
262 option and the private key specified by the \fBsignkey\fR option. If
263 the \fBsignkey\fR option is not present then the private key is read
264 from the same file as the certificate. If neither option is specified then
265 the \s-1OCSP\s0 request is not signed.
266 .IP "\fB\-sign_other filename\fR" 4
267 .IX Item "-sign_other filename"
268 Additional certificates to include in the signed request.
269 .IP "\fB\-nonce\fR, \fB\-no_nonce\fR" 4
270 .IX Item "-nonce, -no_nonce"
271 Add an \s-1OCSP\s0 nonce extension to a request or disable \s-1OCSP\s0 nonce addition.
272 Normally if an \s-1OCSP\s0 request is input using the \fBreqin\fR option no
273 nonce is added: using the \fBnonce\fR option will force addition of a nonce.
274 If an \s-1OCSP\s0 request is being created (using \fBcert\fR and \fBserial\fR options)
275 a nonce is automatically added specifying \fBno_nonce\fR overrides this.
276 .IP "\fB\-req_text\fR, \fB\-resp_text\fR, \fB\-text\fR" 4
277 .IX Item "-req_text, -resp_text, -text"
278 Print out the text form of the \s-1OCSP\s0 request, response or both respectively.
279 .IP "\fB\-reqout file\fR, \fB\-respout file\fR" 4
280 .IX Item "-reqout file, -respout file"
281 Write out the \s-1DER\s0 encoded certificate request or response to \fBfile\fR.
282 .IP "\fB\-reqin file\fR, \fB\-respin file\fR" 4
283 .IX Item "-reqin file, -respin file"
284 Read \s-1OCSP\s0 request or response file from \fBfile\fR. These option are ignored
285 if \s-1OCSP\s0 request or response creation is implied by other options (for example
286 with \fBserial\fR, \fBcert\fR and \fBhost\fR options).
287 .IP "\fB\-url responder_url\fR" 4
288 .IX Item "-url responder_url"
289 Specify the responder \s-1URL.\s0 Both \s-1HTTP\s0 and \s-1HTTPS\s0 (\s-1SSL/TLS\s0) URLs can be specified.
290 .IP "\fB\-host hostname:port\fR, \fB\-path pathname\fR" 4
291 .IX Item "-host hostname:port, -path pathname"
292 If the \fBhost\fR option is present then the \s-1OCSP\s0 request is sent to the host
293 \&\fBhostname\fR on port \fBport\fR. \fBpath\fR specifies the \s-1HTTP\s0 path name to use
294 or \*(L"/\*(R" by default.  This is equivalent to specifying \fB\-url\fR with scheme
295 http:// and the given hostname, port, and pathname.
296 .IP "\fB\-header name=value\fR" 4
297 .IX Item "-header name=value"
298 Adds the header \fBname\fR with the specified \fBvalue\fR to the \s-1OCSP\s0 request
299 that is sent to the responder.
300 This may be repeated.
301 .IP "\fB\-timeout seconds\fR" 4
302 .IX Item "-timeout seconds"
303 Connection timeout to the \s-1OCSP\s0 responder in seconds.
304 On \s-1POSIX\s0 systems, when running as an \s-1OCSP\s0 responder, this option also limits
305 the time that the responder is willing to wait for the client request.
306 This time is measured from the time the responder accepts the connection until
307 the complete request is received.
308 .IP "\fB\-multi process-count\fR" 4
309 .IX Item "-multi process-count"
310 Run the specified number of \s-1OCSP\s0 responder child processes, with the parent
311 process respawning child processes as needed.
312 Child processes will detect changes in the \s-1CA\s0 index file and automatically
313 reload it.
314 When running as a responder \fB\-timeout\fR option is recommended to limit the time
315 each child is willing to wait for the client's \s-1OCSP\s0 response.
316 This option is available on \s-1POSIX\s0 systems (that support the \fIfork()\fR and other
317 required unix system-calls).
318 .IP "\fB\-CAfile file\fR, \fB\-CApath pathname\fR" 4
319 .IX Item "-CAfile file, -CApath pathname"
320 File or pathname containing trusted \s-1CA\s0 certificates. These are used to verify
321 the signature on the \s-1OCSP\s0 response.
322 .IP "\fB\-no\-CAfile\fR" 4
323 .IX Item "-no-CAfile"
324 Do not load the trusted \s-1CA\s0 certificates from the default file location
325 .IP "\fB\-no\-CApath\fR" 4
326 .IX Item "-no-CApath"
327 Do not load the trusted \s-1CA\s0 certificates from the default directory location
328 .IP "\fB\-attime\fR, \fB\-check_ss_sig\fR, \fB\-crl_check\fR, \fB\-crl_check_all\fR, \fB\-explicit_policy\fR, \fB\-extended_crl\fR, \fB\-ignore_critical\fR, \fB\-inhibit_any\fR, \fB\-inhibit_map\fR, \fB\-no_alt_chains\fR, \fB\-no_check_time\fR, \fB\-partial_chain\fR, \fB\-policy\fR, \fB\-policy_check\fR, \fB\-policy_print\fR, \fB\-purpose\fR, \fB\-suiteB_128\fR, \fB\-suiteB_128_only\fR, \fB\-suiteB_192\fR, \fB\-trusted_first\fR, \fB\-use_deltas\fR, \fB\-auth_level\fR, \fB\-verify_depth\fR, \fB\-verify_email\fR, \fB\-verify_hostname\fR, \fB\-verify_ip\fR, \fB\-verify_name\fR, \fB\-x509_strict\fR" 4
329 .IX Item "-attime, -check_ss_sig, -crl_check, -crl_check_all, -explicit_policy, -extended_crl, -ignore_critical, -inhibit_any, -inhibit_map, -no_alt_chains, -no_check_time, -partial_chain, -policy, -policy_check, -policy_print, -purpose, -suiteB_128, -suiteB_128_only, -suiteB_192, -trusted_first, -use_deltas, -auth_level, -verify_depth, -verify_email, -verify_hostname, -verify_ip, -verify_name, -x509_strict"
330 Set different certificate verification options.
331 See \fIverify\fR\|(1) manual page for details.
332 .IP "\fB\-verify_other file\fR" 4
333 .IX Item "-verify_other file"
334 File containing additional certificates to search when attempting to locate
335 the \s-1OCSP\s0 response signing certificate. Some responders omit the actual signer's
336 certificate from the response: this option can be used to supply the necessary
337 certificate in such cases.
338 .IP "\fB\-trust_other\fR" 4
339 .IX Item "-trust_other"
340 The certificates specified by the \fB\-verify_other\fR option should be explicitly
341 trusted and no additional checks will be performed on them. This is useful
342 when the complete responder certificate chain is not available or trusting a
343 root \s-1CA\s0 is not appropriate.
344 .IP "\fB\-VAfile file\fR" 4
345 .IX Item "-VAfile file"
346 File containing explicitly trusted responder certificates. Equivalent to the
347 \&\fB\-verify_other\fR and \fB\-trust_other\fR options.
348 .IP "\fB\-noverify\fR" 4
349 .IX Item "-noverify"
350 Don't attempt to verify the \s-1OCSP\s0 response signature or the nonce
351 values. This option will normally only be used for debugging since it
352 disables all verification of the responders certificate.
353 .IP "\fB\-no_intern\fR" 4
354 .IX Item "-no_intern"
355 Ignore certificates contained in the \s-1OCSP\s0 response when searching for the
356 signers certificate. With this option the signers certificate must be specified
357 with either the \fB\-verify_other\fR or \fB\-VAfile\fR options.
358 .IP "\fB\-no_signature_verify\fR" 4
359 .IX Item "-no_signature_verify"
360 Don't check the signature on the \s-1OCSP\s0 response. Since this option
361 tolerates invalid signatures on \s-1OCSP\s0 responses it will normally only be
362 used for testing purposes.
363 .IP "\fB\-no_cert_verify\fR" 4
364 .IX Item "-no_cert_verify"
365 Don't verify the \s-1OCSP\s0 response signers certificate at all. Since this
366 option allows the \s-1OCSP\s0 response to be signed by any certificate it should
367 only be used for testing purposes.
368 .IP "\fB\-no_chain\fR" 4
369 .IX Item "-no_chain"
370 Do not use certificates in the response as additional untrusted \s-1CA\s0
371 certificates.
372 .IP "\fB\-no_explicit\fR" 4
373 .IX Item "-no_explicit"
374 Do not explicitly trust the root \s-1CA\s0 if it is set to be trusted for \s-1OCSP\s0 signing.
375 .IP "\fB\-no_cert_checks\fR" 4
376 .IX Item "-no_cert_checks"
377 Don't perform any additional checks on the \s-1OCSP\s0 response signers certificate.
378 That is do not make any checks to see if the signers certificate is authorised
379 to provide the necessary status information: as a result this option should
380 only be used for testing purposes.
381 .IP "\fB\-validity_period nsec\fR, \fB\-status_age age\fR" 4
382 .IX Item "-validity_period nsec, -status_age age"
383 These options specify the range of times, in seconds, which will be tolerated
384 in an \s-1OCSP\s0 response. Each certificate status response includes a \fBnotBefore\fR
385 time and an optional \fBnotAfter\fR time. The current time should fall between
386 these two values, but the interval between the two times may be only a few
387 seconds. In practice the \s-1OCSP\s0 responder and clients clocks may not be precisely
388 synchronised and so such a check may fail. To avoid this the
389 \&\fB\-validity_period\fR option can be used to specify an acceptable error range in
390 seconds, the default value is 5 minutes.
391 .Sp
392 If the \fBnotAfter\fR time is omitted from a response then this means that new
393 status information is immediately available. In this case the age of the
394 \&\fBnotBefore\fR field is checked to see it is not older than \fBage\fR seconds old.
395 By default this additional check is not performed.
396 .IP "\fB\-\f(BIdigest\fB\fR" 4
397 .IX Item "-digest"
398 This option sets digest algorithm to use for certificate identification in the
399 \&\s-1OCSP\s0 request. Any digest supported by the OpenSSL \fBdgst\fR command can be used.
400 The default is \s-1SHA\-1.\s0 This option may be used multiple times to specify the
401 digest used by subsequent certificate identifiers.
402 .SS "\s-1OCSP\s0 Server Options"
403 .IX Subsection "OCSP Server Options"
404 .IP "\fB\-index indexfile\fR" 4
405 .IX Item "-index indexfile"
406 The \fBindexfile\fR parameter is the name of a text index file in \fBca\fR
407 format containing certificate revocation information.
408 .Sp
409 If the \fBindex\fR option is specified the \fBocsp\fR utility is in responder
410 mode, otherwise it is in client mode. The request(s) the responder
411 processes can be either specified on the command line (using \fBissuer\fR
412 and \fBserial\fR options), supplied in a file (using the \fBreqin\fR option)
413 or via external \s-1OCSP\s0 clients (if \fBport\fR or \fBurl\fR is specified).
414 .Sp
415 If the \fBindex\fR option is present then the \fB\s-1CA\s0\fR and \fBrsigner\fR options
416 must also be present.
417 .IP "\fB\-CA file\fR" 4
418 .IX Item "-CA file"
419 \&\s-1CA\s0 certificate corresponding to the revocation information in \fBindexfile\fR.
420 .IP "\fB\-rsigner file\fR" 4
421 .IX Item "-rsigner file"
422 The certificate to sign \s-1OCSP\s0 responses with.
423 .IP "\fB\-rother file\fR" 4
424 .IX Item "-rother file"
425 Additional certificates to include in the \s-1OCSP\s0 response.
426 .IP "\fB\-resp_no_certs\fR" 4
427 .IX Item "-resp_no_certs"
428 Don't include any certificates in the \s-1OCSP\s0 response.
429 .IP "\fB\-resp_key_id\fR" 4
430 .IX Item "-resp_key_id"
431 Identify the signer certificate using the key \s-1ID,\s0 default is to use the
432 subject name.
433 .IP "\fB\-rkey file\fR" 4
434 .IX Item "-rkey file"
435 The private key to sign \s-1OCSP\s0 responses with: if not present the file
436 specified in the \fBrsigner\fR option is used.
437 .IP "\fB\-rsigopt nm:v\fR" 4
438 .IX Item "-rsigopt nm:v"
439 Pass options to the signature algorithm when signing \s-1OCSP\s0 responses.
440 Names and values of these options are algorithm-specific.
441 .IP "\fB\-port portnum\fR" 4
442 .IX Item "-port portnum"
443 Port to listen for \s-1OCSP\s0 requests on. The port may also be specified
444 using the \fBurl\fR option.
445 .IP "\fB\-ignore_err\fR" 4
446 .IX Item "-ignore_err"
447 Ignore malformed requests or responses: When acting as an \s-1OCSP\s0 client, retry if
448 a malformed response is received. When acting as an \s-1OCSP\s0 responder, continue
449 running instead of terminating upon receiving a malformed request.
450 .IP "\fB\-nrequest number\fR" 4
451 .IX Item "-nrequest number"
452 The \s-1OCSP\s0 server will exit after receiving \fBnumber\fR requests, default unlimited.
453 .IP "\fB\-nmin minutes\fR, \fB\-ndays days\fR" 4
454 .IX Item "-nmin minutes, -ndays days"
455 Number of minutes or days when fresh revocation information is available:
456 used in the \fBnextUpdate\fR field. If neither option is present then the
457 \&\fBnextUpdate\fR field is omitted meaning fresh revocation information is
458 immediately available.
459 .SH "OCSP Response verification."
460 .IX Header "OCSP Response verification."
461 \&\s-1OCSP\s0 Response follows the rules specified in \s-1RFC2560.\s0
462 .PP
463 Initially the \s-1OCSP\s0 responder certificate is located and the signature on
464 the \s-1OCSP\s0 request checked using the responder certificate's public key.
465 .PP
466 Then a normal certificate verify is performed on the \s-1OCSP\s0 responder certificate
467 building up a certificate chain in the process. The locations of the trusted
468 certificates used to build the chain can be specified by the \fBCAfile\fR
469 and \fBCApath\fR options or they will be looked for in the standard OpenSSL
470 certificates directory.
471 .PP
472 If the initial verify fails then the \s-1OCSP\s0 verify process halts with an
473 error.
474 .PP
475 Otherwise the issuing \s-1CA\s0 certificate in the request is compared to the \s-1OCSP\s0
476 responder certificate: if there is a match then the \s-1OCSP\s0 verify succeeds.
477 .PP
478 Otherwise the \s-1OCSP\s0 responder certificate's \s-1CA\s0 is checked against the issuing
479 \&\s-1CA\s0 certificate in the request. If there is a match and the OCSPSigning
480 extended key usage is present in the \s-1OCSP\s0 responder certificate then the
481 \&\s-1OCSP\s0 verify succeeds.
482 .PP
483 Otherwise, if \fB\-no_explicit\fR is \fBnot\fR set the root \s-1CA\s0 of the \s-1OCSP\s0 responders
484 \&\s-1CA\s0 is checked to see if it is trusted for \s-1OCSP\s0 signing. If it is the \s-1OCSP\s0
485 verify succeeds.
486 .PP
487 If none of these checks is successful then the \s-1OCSP\s0 verify fails.
488 .PP
489 What this effectively means if that if the \s-1OCSP\s0 responder certificate is
490 authorised directly by the \s-1CA\s0 it is issuing revocation information about
491 (and it is correctly configured) then verification will succeed.
492 .PP
493 If the \s-1OCSP\s0 responder is a \*(L"global responder\*(R" which can give details about
494 multiple CAs and has its own separate certificate chain then its root
495 \&\s-1CA\s0 can be trusted for \s-1OCSP\s0 signing. For example:
496 .PP
497 .Vb 1
498 \& openssl x509 \-in ocspCA.pem \-addtrust OCSPSigning \-out trustedCA.pem
499 .Ve
500 .PP
501 Alternatively the responder certificate itself can be explicitly trusted
502 with the \fB\-VAfile\fR option.
503 .SH "NOTES"
504 .IX Header "NOTES"
505 As noted, most of the verify options are for testing or debugging purposes.
506 Normally only the \fB\-CApath\fR, \fB\-CAfile\fR and (if the responder is a 'global
507 \&\s-1VA\s0') \fB\-VAfile\fR options need to be used.
508 .PP
509 The \s-1OCSP\s0 server is only useful for test and demonstration purposes: it is
510 not really usable as a full \s-1OCSP\s0 responder. It contains only a very
511 simple \s-1HTTP\s0 request handling and can only handle the \s-1POST\s0 form of \s-1OCSP\s0
512 queries. It also handles requests serially meaning it cannot respond to
513 new requests until it has processed the current one. The text index file
514 format of revocation is also inefficient for large quantities of revocation
515 data.
516 .PP
517 It is possible to run the \fBocsp\fR application in responder mode via a \s-1CGI\s0
518 script using the \fBreqin\fR and \fBrespout\fR options.
519 .SH "EXAMPLES"
520 .IX Header "EXAMPLES"
521 Create an \s-1OCSP\s0 request and write it to a file:
522 .PP
523 .Vb 1
524 \& openssl ocsp \-issuer issuer.pem \-cert c1.pem \-cert c2.pem \-reqout req.der
525 .Ve
526 .PP
527 Send a query to an \s-1OCSP\s0 responder with \s-1URL\s0 http://ocsp.myhost.com/ save the
528 response to a file, print it out in text form, and verify the response:
529 .PP
530 .Vb 2
531 \& openssl ocsp \-issuer issuer.pem \-cert c1.pem \-cert c2.pem \e
532 \&     \-url http://ocsp.myhost.com/ \-resp_text \-respout resp.der
533 .Ve
534 .PP
535 Read in an \s-1OCSP\s0 response and print out text form:
536 .PP
537 .Vb 1
538 \& openssl ocsp \-respin resp.der \-text \-noverify
539 .Ve
540 .PP
541 \&\s-1OCSP\s0 server on port 8888 using a standard \fBca\fR configuration, and a separate
542 responder certificate. All requests and responses are printed to a file.
543 .PP
544 .Vb 2
545 \& openssl ocsp \-index demoCA/index.txt \-port 8888 \-rsigner rcert.pem \-CA demoCA/cacert.pem
546 \&        \-text \-out log.txt
547 .Ve
548 .PP
549 As above but exit after processing one request:
550 .PP
551 .Vb 2
552 \& openssl ocsp \-index demoCA/index.txt \-port 8888 \-rsigner rcert.pem \-CA demoCA/cacert.pem
553 \&     \-nrequest 1
554 .Ve
555 .PP
556 Query status information using an internally generated request:
557 .PP
558 .Vb 2
559 \& openssl ocsp \-index demoCA/index.txt \-rsigner rcert.pem \-CA demoCA/cacert.pem
560 \&     \-issuer demoCA/cacert.pem \-serial 1
561 .Ve
562 .PP
563 Query status information using request read from a file, and write the response
564 to a second file.
565 .PP
566 .Vb 2
567 \& openssl ocsp \-index demoCA/index.txt \-rsigner rcert.pem \-CA demoCA/cacert.pem
568 \&     \-reqin req.der \-respout resp.der
569 .Ve
570 .SH "HISTORY"
571 .IX Header "HISTORY"
572 The \-no_alt_chains options was first added to OpenSSL 1.1.0.
573 .SH "COPYRIGHT"
574 .IX Header "COPYRIGHT"
575 Copyright 2001\-2018 The OpenSSL Project Authors. All Rights Reserved.
576 .PP
577 Licensed under the OpenSSL license (the \*(L"License\*(R").  You may not use
578 this file except in compliance with the License.  You can obtain a copy
579 in the file \s-1LICENSE\s0 in the source distribution or at
580 <https://www.openssl.org/source/license.html>.