2
0

openssl-verify.pod.in 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. =head1 DESCRIPTION
  22. This command verifies certificate chains. If a certificate chain has multiple
  23. problems, this program attempts to display all of them.
  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, one per file. If no certificates are
  68. given, this command will attempt to read a single certificate from standard
  69. input.
  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-verification-options(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-2021 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