openssl-verify.pod.in 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. =pod
  2. {- OpenSSL::safe::output_do_not_edit_headers(); -}
  3. =head1 NAME
  4. openssl-verify - certificate verification command
  5. =head1 SYNOPSIS
  6. B<openssl> B<verify>
  7. [B<-help>]
  8. [B<-CRLfile> I<file>]
  9. [B<-crl_download>]
  10. [B<-show_chain>]
  11. [B<-verbose>]
  12. [B<-trusted> I<file>]
  13. [B<-untrusted> I<file>]
  14. [B<-vfyopt> I<nm>:I<v>]
  15. {- $OpenSSL::safe::opt_name_synopsis -}
  16. {- $OpenSSL::safe::opt_trust_synopsis -}
  17. {- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_v_synopsis -}
  18. {- $OpenSSL::safe::opt_provider_synopsis -}
  19. [B<-->]
  20. [I<certificate> ...]
  21. =for openssl ifdef engine
  22. =head1 DESCRIPTION
  23. This command verifies certificate chains.
  24. =head1 OPTIONS
  25. =over 4
  26. =item B<-help>
  27. Print out a usage message.
  28. =item B<-CRLfile> I<file>
  29. The file or URI should contain one or more CRLs in PEM or DER format.
  30. This option can be specified more than once to include CRLs from multiple
  31. I<file>s.
  32. =item B<-crl_download>
  33. Attempt to download CRL information for certificates via their CDP entries.
  34. =item B<-show_chain>
  35. Display information about the certificate chain that has been built (if
  36. successful). Certificates in the chain that came from the untrusted list will be
  37. flagged as "untrusted".
  38. =item B<-verbose>
  39. Print extra information about the operations being performed.
  40. =item B<-trusted> I<file>
  41. A file or URI of trusted certificates in PEM, DER, or PKCS#12 format.
  42. This option can be specified more than once to load certificates from multiple
  43. I<file>s.
  44. =item B<-untrusted> I<file>
  45. A file or URI of untrusted certificates in PEM, DER, or PKCS#12 format
  46. to use for chain building.
  47. This option can be specified more than once to load certificates from multiple
  48. I<file>s.
  49. =item B<-vfyopt> I<nm>:I<v>
  50. Pass options to the signature algorithm during verify operations.
  51. Names and values of these options are algorithm-specific.
  52. {- $OpenSSL::safe::opt_name_item -}
  53. {- $OpenSSL::safe::opt_engine_item -}
  54. {- output_off() if $disabled{"deprecated-3.0"}; "" -}
  55. To load certificates or CRLs that require engine support, specify the
  56. B<-engine> option before any of the
  57. B<-trusted>, B<-untrusted> or B<-CRLfile> options.
  58. {- output_on() if $disabled{"deprecated-3.0"}; "" -}
  59. {- $OpenSSL::safe::opt_trust_item -}
  60. {- $OpenSSL::safe::opt_v_item -}
  61. {- $OpenSSL::safe::opt_provider_item -}
  62. =item B<-->
  63. Indicates the last option. All arguments following this are assumed to be
  64. certificate files. This is useful if the first certificate filename begins
  65. with a B<->.
  66. =item I<certificate> ...
  67. One or more target certificates to verify. If no certificates are given,
  68. this command will attempt to read a certificate from standard input.
  69. If a certificate chain has multiple problems, this program attempts to
  70. display all of them.
  71. =back
  72. =head1 DIAGNOSTICS
  73. When a verify operation fails the output messages can be somewhat cryptic. The
  74. general form of the error message is:
  75. server.pem: /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
  76. error 24 at 1 depth lookup:invalid CA certificate
  77. The first line contains the name of the certificate being verified followed by
  78. the subject name of the certificate. The second line contains the error number
  79. and the depth. The depth is number of the certificate being verified when a
  80. problem was detected starting with zero for the target ("leaf") certificate
  81. itself then 1 for the CA that signed the target certificate and so on.
  82. Finally a textual version of the error number is presented.
  83. A list of the error codes and messages can be found in
  84. L<X509_STORE_CTX_get_error(3)>; the full list is defined in the header file
  85. F<< <openssl/x509_vfy.h> >>.
  86. This command ignores many errors, in order to allow all the problems with a
  87. certificate chain to be determined.
  88. =head1 BUGS
  89. Although the issuer checks are a considerable improvement over the old
  90. technique they still suffer from limitations in the underlying X509_LOOKUP
  91. API. One consequence of this is that trusted certificates with matching
  92. subject name must either appear in a file (as specified by the B<-CAfile>
  93. option), a directory (as specified by B<-CApath>), or a store (as specified
  94. by B<-CAstore>). If they occur in more than one location then only the
  95. certificates in the file will be recognised.
  96. Previous versions of OpenSSL assume certificates with matching subject
  97. name are identical and mishandled them.
  98. Previous versions of this documentation swapped the meaning of the
  99. B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT> and
  100. B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY> error codes.
  101. =head1 SEE ALSO
  102. L<openssl-verification-options(1)>,
  103. L<openssl-x509(1)>,
  104. L<ossl_store-file(7)>
  105. =head1 HISTORY
  106. The B<-show_chain> option was added in OpenSSL 1.1.0.
  107. The B<-engine option> was deprecated in OpenSSL 3.0.
  108. =head1 COPYRIGHT
  109. Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
  110. Licensed under the Apache License 2.0 (the "License"). You may not use
  111. this file except in compliance with the License. You can obtain a copy
  112. in the file LICENSE in the source distribution or at
  113. L<https://www.openssl.org/source/license.html>.
  114. =cut