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