openssl-verify.pod.in 4.8 KB

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