ocsp.1 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  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 "2019-09-12" "1.0.2g" "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. ocsp \- Online Certificate Status Protocol utility
  139. .SH "SYNOPSIS"
  140. .IX Header "SYNOPSIS"
  141. \&\fBopenssl\fR \fBocsp\fR
  142. [\fB\-out file\fR]
  143. [\fB\-issuer file\fR]
  144. [\fB\-cert file\fR]
  145. [\fB\-serial n\fR]
  146. [\fB\-signer file\fR]
  147. [\fB\-signkey file\fR]
  148. [\fB\-sign_other file\fR]
  149. [\fB\-no_certs\fR]
  150. [\fB\-req_text\fR]
  151. [\fB\-resp_text\fR]
  152. [\fB\-text\fR]
  153. [\fB\-reqout file\fR]
  154. [\fB\-respout file\fR]
  155. [\fB\-reqin file\fR]
  156. [\fB\-respin file\fR]
  157. [\fB\-nonce\fR]
  158. [\fB\-no_nonce\fR]
  159. [\fB\-url \s-1URL\s0\fR]
  160. [\fB\-host host:n\fR]
  161. [\fB\-path\fR]
  162. [\fB\-CApath dir\fR]
  163. [\fB\-CAfile file\fR]
  164. [\fB\-no_alt_chains\fR]]
  165. [\fB\-VAfile file\fR]
  166. [\fB\-validity_period n\fR]
  167. [\fB\-status_age n\fR]
  168. [\fB\-noverify\fR]
  169. [\fB\-verify_other file\fR]
  170. [\fB\-trust_other\fR]
  171. [\fB\-no_intern\fR]
  172. [\fB\-no_signature_verify\fR]
  173. [\fB\-no_cert_verify\fR]
  174. [\fB\-no_chain\fR]
  175. [\fB\-no_cert_checks\fR]
  176. [\fB\-no_explicit\fR]
  177. [\fB\-port num\fR]
  178. [\fB\-index file\fR]
  179. [\fB\-CA file\fR]
  180. [\fB\-rsigner file\fR]
  181. [\fB\-rkey file\fR]
  182. [\fB\-rother file\fR]
  183. [\fB\-resp_no_certs\fR]
  184. [\fB\-nmin n\fR]
  185. [\fB\-ndays n\fR]
  186. [\fB\-resp_key_id\fR]
  187. [\fB\-nrequest n\fR]
  188. [\fB\-md5|\-sha1|...\fR]
  189. .SH "DESCRIPTION"
  190. .IX Header "DESCRIPTION"
  191. The Online Certificate Status Protocol (\s-1OCSP\s0) enables applications to
  192. determine the (revocation) state of an identified certificate (\s-1RFC 2560\s0).
  193. .PP
  194. The \fBocsp\fR command performs many common \s-1OCSP\s0 tasks. It can be used
  195. to print out requests and responses, create requests and send queries
  196. to an \s-1OCSP\s0 responder and behave like a mini \s-1OCSP\s0 server itself.
  197. .SH "OCSP CLIENT OPTIONS"
  198. .IX Header "OCSP CLIENT OPTIONS"
  199. .IP "\fB\-out filename\fR" 4
  200. .IX Item "-out filename"
  201. specify output filename, default is standard output.
  202. .IP "\fB\-issuer filename\fR" 4
  203. .IX Item "-issuer filename"
  204. This specifies the current issuer certificate. This option can be used
  205. multiple times. The certificate specified in \fBfilename\fR must be in
  206. \&\s-1PEM\s0 format. This option \fB\s-1MUST\s0\fR come before any \fB\-cert\fR options.
  207. .IP "\fB\-cert filename\fR" 4
  208. .IX Item "-cert filename"
  209. Add the certificate \fBfilename\fR to the request. The issuer certificate
  210. is taken from the previous \fBissuer\fR option, or an error occurs if no
  211. issuer certificate is specified.
  212. .IP "\fB\-serial num\fR" 4
  213. .IX Item "-serial num"
  214. Same as the \fBcert\fR option except the certificate with serial number
  215. \&\fBnum\fR is added to the request. The serial number is interpreted as a
  216. decimal integer unless preceded by \fB0x\fR. Negative integers can also
  217. be specified by preceding the value by a \fB\-\fR sign.
  218. .IP "\fB\-signer filename\fR, \fB\-signkey filename\fR" 4
  219. .IX Item "-signer filename, -signkey filename"
  220. Sign the \s-1OCSP\s0 request using the certificate specified in the \fBsigner\fR
  221. option and the private key specified by the \fBsignkey\fR option. If
  222. the \fBsignkey\fR option is not present then the private key is read
  223. from the same file as the certificate. If neither option is specified then
  224. the \s-1OCSP\s0 request is not signed.
  225. .IP "\fB\-sign_other filename\fR" 4
  226. .IX Item "-sign_other filename"
  227. Additional certificates to include in the signed request.
  228. .IP "\fB\-nonce\fR, \fB\-no_nonce\fR" 4
  229. .IX Item "-nonce, -no_nonce"
  230. Add an \s-1OCSP\s0 nonce extension to a request or disable \s-1OCSP\s0 nonce addition.
  231. Normally if an \s-1OCSP\s0 request is input using the \fBrespin\fR option no
  232. nonce is added: using the \fBnonce\fR option will force addition of a nonce.
  233. If an \s-1OCSP\s0 request is being created (using \fBcert\fR and \fBserial\fR options)
  234. a nonce is automatically added specifying \fBno_nonce\fR overrides this.
  235. .IP "\fB\-req_text\fR, \fB\-resp_text\fR, \fB\-text\fR" 4
  236. .IX Item "-req_text, -resp_text, -text"
  237. print out the text form of the \s-1OCSP\s0 request, response or both respectively.
  238. .IP "\fB\-reqout file\fR, \fB\-respout file\fR" 4
  239. .IX Item "-reqout file, -respout file"
  240. write out the \s-1DER\s0 encoded certificate request or response to \fBfile\fR.
  241. .IP "\fB\-reqin file\fR, \fB\-respin file\fR" 4
  242. .IX Item "-reqin file, -respin file"
  243. read \s-1OCSP\s0 request or response file from \fBfile\fR. These option are ignored
  244. if \s-1OCSP\s0 request or response creation is implied by other options (for example
  245. with \fBserial\fR, \fBcert\fR and \fBhost\fR options).
  246. .IP "\fB\-url responder_url\fR" 4
  247. .IX Item "-url responder_url"
  248. specify the responder \s-1URL.\s0 Both \s-1HTTP\s0 and \s-1HTTPS\s0 (\s-1SSL/TLS\s0) URLs can be specified.
  249. .IP "\fB\-host hostname:port\fR, \fB\-path pathname\fR" 4
  250. .IX Item "-host hostname:port, -path pathname"
  251. if the \fBhost\fR option is present then the \s-1OCSP\s0 request is sent to the host
  252. \&\fBhostname\fR on port \fBport\fR. \fBpath\fR specifies the \s-1HTTP\s0 path name to use
  253. or \*(L"/\*(R" by default.
  254. .IP "\fB\-timeout seconds\fR" 4
  255. .IX Item "-timeout seconds"
  256. connection timeout to the \s-1OCSP\s0 responder in seconds
  257. .IP "\fB\-CAfile file\fR, \fB\-CApath pathname\fR" 4
  258. .IX Item "-CAfile file, -CApath pathname"
  259. file or pathname containing trusted \s-1CA\s0 certificates. These are used to verify
  260. the signature on the \s-1OCSP\s0 response.
  261. .IP "\fB\-no_alt_chains\fR" 4
  262. .IX Item "-no_alt_chains"
  263. See \fBverify\fR manual page for details.
  264. .IP "\fB\-verify_other file\fR" 4
  265. .IX Item "-verify_other file"
  266. file containing additional certificates to search when attempting to locate
  267. the \s-1OCSP\s0 response signing certificate. Some responders omit the actual signer's
  268. certificate from the response: this option can be used to supply the necessary
  269. certificate in such cases.
  270. .IP "\fB\-trust_other\fR" 4
  271. .IX Item "-trust_other"
  272. the certificates specified by the \fB\-verify_other\fR option should be explicitly
  273. trusted and no additional checks will be performed on them. This is useful
  274. when the complete responder certificate chain is not available or trusting a
  275. root \s-1CA\s0 is not appropriate.
  276. .IP "\fB\-VAfile file\fR" 4
  277. .IX Item "-VAfile file"
  278. file containing explicitly trusted responder certificates. Equivalent to the
  279. \&\fB\-verify_other\fR and \fB\-trust_other\fR options.
  280. .IP "\fB\-noverify\fR" 4
  281. .IX Item "-noverify"
  282. don't attempt to verify the \s-1OCSP\s0 response signature or the nonce values. This
  283. option will normally only be used for debugging since it disables all verification
  284. of the responders certificate.
  285. .IP "\fB\-no_intern\fR" 4
  286. .IX Item "-no_intern"
  287. ignore certificates contained in the \s-1OCSP\s0 response when searching for the
  288. signers certificate. With this option the signers certificate must be specified
  289. with either the \fB\-verify_other\fR or \fB\-VAfile\fR options.
  290. .IP "\fB\-no_signature_verify\fR" 4
  291. .IX Item "-no_signature_verify"
  292. don't check the signature on the \s-1OCSP\s0 response. Since this option tolerates invalid
  293. signatures on \s-1OCSP\s0 responses it will normally only be used for testing purposes.
  294. .IP "\fB\-no_cert_verify\fR" 4
  295. .IX Item "-no_cert_verify"
  296. don't verify the \s-1OCSP\s0 response signers certificate at all. Since this option allows
  297. the \s-1OCSP\s0 response to be signed by any certificate it should only be used for
  298. testing purposes.
  299. .IP "\fB\-no_chain\fR" 4
  300. .IX Item "-no_chain"
  301. do not use certificates in the response as additional untrusted \s-1CA\s0
  302. certificates.
  303. .IP "\fB\-no_explicit\fR" 4
  304. .IX Item "-no_explicit"
  305. do not explicitly trust the root \s-1CA\s0 if it is set to be trusted for \s-1OCSP\s0 signing.
  306. .IP "\fB\-no_cert_checks\fR" 4
  307. .IX Item "-no_cert_checks"
  308. don't perform any additional checks on the \s-1OCSP\s0 response signers certificate.
  309. That is do not make any checks to see if the signers certificate is authorised
  310. to provide the necessary status information: as a result this option should
  311. only be used for testing purposes.
  312. .IP "\fB\-validity_period nsec\fR, \fB\-status_age age\fR" 4
  313. .IX Item "-validity_period nsec, -status_age age"
  314. these options specify the range of times, in seconds, which will be tolerated
  315. in an \s-1OCSP\s0 response. Each certificate status response includes a \fBnotBefore\fR time and
  316. an optional \fBnotAfter\fR time. The current time should fall between these two values, but
  317. the interval between the two times may be only a few seconds. In practice the \s-1OCSP\s0
  318. responder and clients clocks may not be precisely synchronised and so such a check
  319. may fail. To avoid this the \fB\-validity_period\fR option can be used to specify an
  320. acceptable error range in seconds, the default value is 5 minutes.
  321. .Sp
  322. If the \fBnotAfter\fR time is omitted from a response then this means that new status
  323. information is immediately available. In this case the age of the \fBnotBefore\fR field
  324. is checked to see it is not older than \fBage\fR seconds old. By default this additional
  325. check is not performed.
  326. .IP "\fB\-md5|\-sha1|\-sha256|\-ripemod160|...\fR" 4
  327. .IX Item "-md5|-sha1|-sha256|-ripemod160|..."
  328. this option sets digest algorithm to use for certificate identification
  329. in the \s-1OCSP\s0 request. By default \s-1SHA\-1\s0 is used.
  330. .SH "OCSP SERVER OPTIONS"
  331. .IX Header "OCSP SERVER OPTIONS"
  332. .IP "\fB\-index indexfile\fR" 4
  333. .IX Item "-index indexfile"
  334. \&\fBindexfile\fR is a text index file in \fBca\fR format containing certificate revocation
  335. information.
  336. .Sp
  337. If the \fBindex\fR option is specified the \fBocsp\fR utility is in responder mode, otherwise
  338. it is in client mode. The request(s) the responder processes can be either specified on
  339. the command line (using \fBissuer\fR and \fBserial\fR options), supplied in a file (using the
  340. \&\fBrespin\fR option) or via external \s-1OCSP\s0 clients (if \fBport\fR or \fBurl\fR is specified).
  341. .Sp
  342. If the \fBindex\fR option is present then the \fB\s-1CA\s0\fR and \fBrsigner\fR options must also be
  343. present.
  344. .IP "\fB\-CA file\fR" 4
  345. .IX Item "-CA file"
  346. \&\s-1CA\s0 certificate corresponding to the revocation information in \fBindexfile\fR.
  347. .IP "\fB\-rsigner file\fR" 4
  348. .IX Item "-rsigner file"
  349. The certificate to sign \s-1OCSP\s0 responses with.
  350. .IP "\fB\-rother file\fR" 4
  351. .IX Item "-rother file"
  352. Additional certificates to include in the \s-1OCSP\s0 response.
  353. .IP "\fB\-resp_no_certs\fR" 4
  354. .IX Item "-resp_no_certs"
  355. Don't include any certificates in the \s-1OCSP\s0 response.
  356. .IP "\fB\-resp_key_id\fR" 4
  357. .IX Item "-resp_key_id"
  358. Identify the signer certificate using the key \s-1ID,\s0 default is to use the subject name.
  359. .IP "\fB\-rkey file\fR" 4
  360. .IX Item "-rkey file"
  361. The private key to sign \s-1OCSP\s0 responses with: if not present the file specified in the
  362. \&\fBrsigner\fR option is used.
  363. .IP "\fB\-port portnum\fR" 4
  364. .IX Item "-port portnum"
  365. Port to listen for \s-1OCSP\s0 requests on. The port may also be specified using the \fBurl\fR
  366. option.
  367. .IP "\fB\-nrequest number\fR" 4
  368. .IX Item "-nrequest number"
  369. The \s-1OCSP\s0 server will exit after receiving \fBnumber\fR requests, default unlimited.
  370. .IP "\fB\-nmin minutes\fR, \fB\-ndays days\fR" 4
  371. .IX Item "-nmin minutes, -ndays days"
  372. Number of minutes or days when fresh revocation information is available: used in the
  373. \&\fBnextUpdate\fR field. If neither option is present then the \fBnextUpdate\fR field is
  374. omitted meaning fresh revocation information is immediately available.
  375. .SH "OCSP Response verification."
  376. .IX Header "OCSP Response verification."
  377. \&\s-1OCSP\s0 Response follows the rules specified in \s-1RFC2560.\s0
  378. .PP
  379. Initially the \s-1OCSP\s0 responder certificate is located and the signature on
  380. the \s-1OCSP\s0 request checked using the responder certificate's public key.
  381. .PP
  382. Then a normal certificate verify is performed on the \s-1OCSP\s0 responder certificate
  383. building up a certificate chain in the process. The locations of the trusted
  384. certificates used to build the chain can be specified by the \fBCAfile\fR
  385. and \fBCApath\fR options or they will be looked for in the standard OpenSSL
  386. certificates directory.
  387. .PP
  388. If the initial verify fails then the \s-1OCSP\s0 verify process halts with an
  389. error.
  390. .PP
  391. Otherwise the issuing \s-1CA\s0 certificate in the request is compared to the \s-1OCSP\s0
  392. responder certificate: if there is a match then the \s-1OCSP\s0 verify succeeds.
  393. .PP
  394. Otherwise the \s-1OCSP\s0 responder certificate's \s-1CA\s0 is checked against the issuing
  395. \&\s-1CA\s0 certificate in the request. If there is a match and the OCSPSigning
  396. extended key usage is present in the \s-1OCSP\s0 responder certificate then the
  397. \&\s-1OCSP\s0 verify succeeds.
  398. .PP
  399. Otherwise, if \fB\-no_explicit\fR is \fBnot\fR set the root \s-1CA\s0 of the \s-1OCSP\s0 responders
  400. \&\s-1CA\s0 is checked to see if it is trusted for \s-1OCSP\s0 signing. If it is the \s-1OCSP\s0
  401. verify succeeds.
  402. .PP
  403. If none of these checks is successful then the \s-1OCSP\s0 verify fails.
  404. .PP
  405. What this effectively means if that if the \s-1OCSP\s0 responder certificate is
  406. authorised directly by the \s-1CA\s0 it is issuing revocation information about
  407. (and it is correctly configured) then verification will succeed.
  408. .PP
  409. If the \s-1OCSP\s0 responder is a \*(L"global responder\*(R" which can give details about
  410. multiple CAs and has its own separate certificate chain then its root
  411. \&\s-1CA\s0 can be trusted for \s-1OCSP\s0 signing. For example:
  412. .PP
  413. .Vb 1
  414. \& openssl x509 \-in ocspCA.pem \-addtrust OCSPSigning \-out trustedCA.pem
  415. .Ve
  416. .PP
  417. Alternatively the responder certificate itself can be explicitly trusted
  418. with the \fB\-VAfile\fR option.
  419. .SH "NOTES"
  420. .IX Header "NOTES"
  421. As noted, most of the verify options are for testing or debugging purposes.
  422. Normally only the \fB\-CApath\fR, \fB\-CAfile\fR and (if the responder is a 'global
  423. \&\s-1VA\s0') \fB\-VAfile\fR options need to be used.
  424. .PP
  425. The \s-1OCSP\s0 server is only useful for test and demonstration purposes: it is
  426. not really usable as a full \s-1OCSP\s0 responder. It contains only a very
  427. simple \s-1HTTP\s0 request handling and can only handle the \s-1POST\s0 form of \s-1OCSP\s0
  428. queries. It also handles requests serially meaning it cannot respond to
  429. new requests until it has processed the current one. The text index file
  430. format of revocation is also inefficient for large quantities of revocation
  431. data.
  432. .PP
  433. It is possible to run the \fBocsp\fR application in responder mode via a \s-1CGI\s0
  434. script using the \fBrespin\fR and \fBrespout\fR options.
  435. .SH "EXAMPLES"
  436. .IX Header "EXAMPLES"
  437. Create an \s-1OCSP\s0 request and write it to a file:
  438. .PP
  439. .Vb 1
  440. \& openssl ocsp \-issuer issuer.pem \-cert c1.pem \-cert c2.pem \-reqout req.der
  441. .Ve
  442. .PP
  443. Send a query to an \s-1OCSP\s0 responder with \s-1URL\s0 http://ocsp.myhost.com/ save the
  444. response to a file and print it out in text form
  445. .PP
  446. .Vb 2
  447. \& openssl ocsp \-issuer issuer.pem \-cert c1.pem \-cert c2.pem \e
  448. \& \-url http://ocsp.myhost.com/ \-resp_text \-respout resp.der
  449. .Ve
  450. .PP
  451. Read in an \s-1OCSP\s0 response and print out text form:
  452. .PP
  453. .Vb 1
  454. \& openssl ocsp \-respin resp.der \-text
  455. .Ve
  456. .PP
  457. \&\s-1OCSP\s0 server on port 8888 using a standard \fBca\fR configuration, and a separate
  458. responder certificate. All requests and responses are printed to a file.
  459. .PP
  460. .Vb 2
  461. \& openssl ocsp \-index demoCA/index.txt \-port 8888 \-rsigner rcert.pem \-CA demoCA/cacert.pem
  462. \& \-text \-out log.txt
  463. .Ve
  464. .PP
  465. As above but exit after processing one request:
  466. .PP
  467. .Vb 2
  468. \& openssl ocsp \-index demoCA/index.txt \-port 8888 \-rsigner rcert.pem \-CA demoCA/cacert.pem
  469. \& \-nrequest 1
  470. .Ve
  471. .PP
  472. Query status information using internally generated request:
  473. .PP
  474. .Vb 2
  475. \& openssl ocsp \-index demoCA/index.txt \-rsigner rcert.pem \-CA demoCA/cacert.pem
  476. \& \-issuer demoCA/cacert.pem \-serial 1
  477. .Ve
  478. .PP
  479. Query status information using request read from a file, write response to a
  480. second file.
  481. .PP
  482. .Vb 2
  483. \& openssl ocsp \-index demoCA/index.txt \-rsigner rcert.pem \-CA demoCA/cacert.pem
  484. \& \-reqin req.der \-respout resp.der
  485. .Ve
  486. .SH "HISTORY"
  487. .IX Header "HISTORY"
  488. The \-no_alt_chains options was first added to OpenSSL 1.0.2b.