openssl-verify.1ossl 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. .\" -*- mode: troff; coding: utf-8 -*-
  2. .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
  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-VERIFY 1ossl"
  58. .TH OPENSSL-VERIFY 1ossl 2025-01-17 3.4.0 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\-verify \- certificate verification command
  65. .SH SYNOPSIS
  66. .IX Header "SYNOPSIS"
  67. \&\fBopenssl\fR \fBverify\fR
  68. [\fB\-help\fR]
  69. [\fB\-CRLfile\fR \fIfilename\fR|\fIuri\fR]
  70. [\fB\-crl_download\fR]
  71. [\fB\-show_chain\fR]
  72. [\fB\-verbose\fR]
  73. [\fB\-trusted\fR \fIfilename\fR|\fIuri\fR]
  74. [\fB\-untrusted\fR \fIfilename\fR|\fIuri\fR]
  75. [\fB\-vfyopt\fR \fInm\fR:\fIv\fR]
  76. [\fB\-nameopt\fR \fIoption\fR]
  77. [\fB\-CAfile\fR \fIfile\fR]
  78. [\fB\-no\-CAfile\fR]
  79. [\fB\-CApath\fR \fIdir\fR]
  80. [\fB\-no\-CApath\fR]
  81. [\fB\-CAstore\fR \fIuri\fR]
  82. [\fB\-no\-CAstore\fR]
  83. [\fB\-engine\fR \fIid\fR]
  84. [\fB\-allow_proxy_certs\fR]
  85. [\fB\-attime\fR \fItimestamp\fR]
  86. [\fB\-no_check_time\fR]
  87. [\fB\-check_ss_sig\fR]
  88. [\fB\-crl_check\fR]
  89. [\fB\-crl_check_all\fR]
  90. [\fB\-explicit_policy\fR]
  91. [\fB\-extended_crl\fR]
  92. [\fB\-ignore_critical\fR]
  93. [\fB\-inhibit_any\fR]
  94. [\fB\-inhibit_map\fR]
  95. [\fB\-partial_chain\fR]
  96. [\fB\-policy\fR \fIarg\fR]
  97. [\fB\-policy_check\fR]
  98. [\fB\-policy_print\fR]
  99. [\fB\-purpose\fR \fIpurpose\fR]
  100. [\fB\-suiteB_128\fR]
  101. [\fB\-suiteB_128_only\fR]
  102. [\fB\-suiteB_192\fR]
  103. [\fB\-trusted_first\fR]
  104. [\fB\-no_alt_chains\fR]
  105. [\fB\-use_deltas\fR]
  106. [\fB\-auth_level\fR \fInum\fR]
  107. [\fB\-verify_depth\fR \fInum\fR]
  108. [\fB\-verify_email\fR \fIemail\fR]
  109. [\fB\-verify_hostname\fR \fIhostname\fR]
  110. [\fB\-verify_ip\fR \fIip\fR]
  111. [\fB\-verify_name\fR \fIname\fR]
  112. [\fB\-x509_strict\fR]
  113. [\fB\-issuer_checks\fR]
  114. [\fB\-provider\fR \fIname\fR]
  115. [\fB\-provider\-path\fR \fIpath\fR]
  116. [\fB\-propquery\fR \fIpropq\fR]
  117. [\fB\-\-\fR]
  118. [\fIcertificate\fR ...]
  119. .SH DESCRIPTION
  120. .IX Header "DESCRIPTION"
  121. This command verifies certificate chains. If a certificate chain has multiple
  122. problems, this program attempts to display all of them.
  123. .SH OPTIONS
  124. .IX Header "OPTIONS"
  125. .IP \fB\-help\fR 4
  126. .IX Item "-help"
  127. Print out a usage message.
  128. .IP "\fB\-CRLfile\fR \fIfilename\fR|\fIuri\fR" 4
  129. .IX Item "-CRLfile filename|uri"
  130. The file or URI should contain one or more CRLs in PEM or DER format.
  131. This option can be specified more than once to include CRLs from multiple
  132. sources.
  133. .IP \fB\-crl_download\fR 4
  134. .IX Item "-crl_download"
  135. Attempt to download CRL information for certificates via their CDP entries.
  136. .IP \fB\-show_chain\fR 4
  137. .IX Item "-show_chain"
  138. Display information about the certificate chain that has been built (if
  139. successful). Certificates in the chain that came from the untrusted list will be
  140. flagged as "untrusted".
  141. .IP \fB\-verbose\fR 4
  142. .IX Item "-verbose"
  143. Print extra information about the operations being performed.
  144. .IP "\fB\-trusted\fR \fIfilename\fR|\fIuri\fR" 4
  145. .IX Item "-trusted filename|uri"
  146. A file or URI of (more or less) trusted certificates.
  147. See \fBopenssl\-verification\-options\fR\|(1) for more information on trust settings.
  148. .Sp
  149. This option can be specified more than once to load certificates from multiple
  150. sources.
  151. .IP "\fB\-untrusted\fR \fIfilename\fR|\fIuri\fR" 4
  152. .IX Item "-untrusted filename|uri"
  153. A file or URI of untrusted certificates to use for chain building.
  154. This option can be specified more than once to load certificates from multiple
  155. sources.
  156. .IP "\fB\-vfyopt\fR \fInm\fR:\fIv\fR" 4
  157. .IX Item "-vfyopt nm:v"
  158. Pass options to the signature algorithm during verify operations.
  159. Names and values of these options are algorithm-specific.
  160. .IP "\fB\-nameopt\fR \fIoption\fR" 4
  161. .IX Item "-nameopt option"
  162. This specifies how the subject or issuer names are displayed.
  163. See \fBopenssl\-namedisplay\-options\fR\|(1) for details.
  164. .IP "\fB\-engine\fR \fIid\fR" 4
  165. .IX Item "-engine id"
  166. See "Engine Options" in \fBopenssl\fR\|(1).
  167. This option is deprecated.
  168. .Sp
  169. To load certificates or CRLs that require engine support, specify the
  170. \&\fB\-engine\fR option before any of the
  171. \&\fB\-trusted\fR, \fB\-untrusted\fR or \fB\-CRLfile\fR options.
  172. .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
  173. .IX Item "-CAfile file, -no-CAfile, -CApath dir, -no-CApath, -CAstore uri, -no-CAstore"
  174. See "Trusted Certificate Options" in \fBopenssl\-verification\-options\fR\|(1) for details.
  175. .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
  176. .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"
  177. Set various options of certificate chain verification.
  178. See "Verification Options" in \fBopenssl\-verification\-options\fR\|(1) for details.
  179. .IP "\fB\-provider\fR \fIname\fR" 4
  180. .IX Item "-provider name"
  181. .PD 0
  182. .IP "\fB\-provider\-path\fR \fIpath\fR" 4
  183. .IX Item "-provider-path path"
  184. .IP "\fB\-propquery\fR \fIpropq\fR" 4
  185. .IX Item "-propquery propq"
  186. .PD
  187. See "Provider Options" in \fBopenssl\fR\|(1), \fBprovider\fR\|(7), and \fBproperty\fR\|(7).
  188. .IP \fB\-\-\fR 4
  189. .IX Item "--"
  190. Indicates the last option. All arguments following this are assumed to be
  191. certificate files. This is useful if the first certificate filename begins
  192. with a \fB\-\fR.
  193. .IP "\fIcertificate\fR ..." 4
  194. .IX Item "certificate ..."
  195. One or more target certificates to verify, one per file. If no certificates are
  196. given, this command will attempt to read a single certificate from standard
  197. input.
  198. .SH DIAGNOSTICS
  199. .IX Header "DIAGNOSTICS"
  200. When a verify operation fails the output messages can be somewhat cryptic. The
  201. general form of the error message is:
  202. .PP
  203. .Vb 2
  204. \& server.pem: /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
  205. \& error 24 at 1 depth lookup:invalid CA certificate
  206. .Ve
  207. .PP
  208. The first line contains the name of the certificate being verified followed by
  209. the subject name of the certificate. The second line contains the error number
  210. and the depth. The depth is number of the certificate being verified when a
  211. problem was detected starting with zero for the target ("leaf") certificate
  212. itself then 1 for the CA that signed the target certificate and so on.
  213. Finally a textual version of the error number is presented.
  214. .PP
  215. A list of the error codes and messages can be found in
  216. \&\fBX509_STORE_CTX_get_error\fR\|(3); the full list is defined in the header file
  217. \&\fI<openssl/x509_vfy.h>\fR.
  218. .PP
  219. This command ignores many errors, in order to allow all the problems with a
  220. certificate chain to be determined.
  221. .SH "SEE ALSO"
  222. .IX Header "SEE ALSO"
  223. \&\fBopenssl\-verification\-options\fR\|(1),
  224. \&\fBopenssl\-x509\fR\|(1),
  225. \&\fBossl_store\-file\fR\|(7)
  226. .SH HISTORY
  227. .IX Header "HISTORY"
  228. The \fB\-show_chain\fR option was added in OpenSSL 1.1.0.
  229. .PP
  230. The \fB\-engine option\fR was deprecated in OpenSSL 3.0.
  231. .SH COPYRIGHT
  232. .IX Header "COPYRIGHT"
  233. Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
  234. .PP
  235. Licensed under the Apache License 2.0 (the "License"). You may not use
  236. this file except in compliance with the License. You can obtain a copy
  237. in the file LICENSE in the source distribution or at
  238. <https://www.openssl.org/source/license.html>.