1999-11-29 01:09:25 +00:00
|
|
|
=pod
|
2019-10-30 23:35:08 -04:00
|
|
|
{- OpenSSL::safe::output_do_not_edit_headers(); -}
|
2019-10-12 17:45:56 -04:00
|
|
|
|
1999-11-29 01:09:25 +00:00
|
|
|
=head1 NAME
|
|
|
|
|
2020-02-18 11:52:12 -05:00
|
|
|
openssl-verify - certificate verification command
|
1999-11-29 01:09:25 +00:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
B<openssl> B<verify>
|
2016-02-05 11:58:45 -05:00
|
|
|
[B<-help>]
|
2019-09-25 15:20:11 -04:00
|
|
|
[B<-CRLfile> I<file>]
|
2015-06-25 12:34:38 +01:00
|
|
|
[B<-crl_download>]
|
2015-06-25 12:28:28 +01:00
|
|
|
[B<-show_chain>]
|
2019-10-12 17:45:56 -04:00
|
|
|
[B<-verbose>]
|
|
|
|
[B<-trusted> I<file>]
|
|
|
|
[B<-untrusted> I<file>]
|
2020-03-10 23:08:59 +01:00
|
|
|
[B<-vfyopt> I<nm>:I<v>]
|
2019-10-24 23:02:09 -04:00
|
|
|
{- $OpenSSL::safe::opt_name_synopsis -}
|
2019-10-12 17:45:56 -04:00
|
|
|
{- $OpenSSL::safe::opt_trust_synopsis -}
|
2020-09-21 11:56:01 +02:00
|
|
|
{- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_v_synopsis -}
|
2020-02-25 14:29:30 +10:00
|
|
|
{- $OpenSSL::safe::opt_provider_synopsis -}
|
2019-10-02 17:13:03 +02:00
|
|
|
[B<-->]
|
2019-10-01 18:16:29 +02:00
|
|
|
[I<certificate> ...]
|
1999-11-29 01:09:25 +00:00
|
|
|
|
2020-03-10 23:08:59 +01:00
|
|
|
=for openssl ifdef engine
|
2019-09-22 19:49:25 -04:00
|
|
|
|
1999-11-29 01:09:25 +00:00
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
Command docs: fix up command references
Almost all OpenSSL commands are in reality 'openssl cmd', so make sure
they are refered to like that and not just as the sub-command.
Self-references are avoided as much as is possible, and replaced with
"this command". In some cases, we even avoid that with a slight
rewrite of the sentence or paragrah they were in. However, in the few
cases where a self-reference is still admissible, they are done in
bold, i.e. openssl-speed.pod references itself like this:
B<openssl speed>
References to other commands are done as manual links, i.e. CA.pl.pod
references 'openssl req' like this: L<openssl-req(1)>
Some commands are examples rather than references; we enclose those in
C<>.
While we are it, we abolish "utility", replacing it with "command", or
remove it entirely in some cases.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10065)
2019-10-01 19:43:36 +02:00
|
|
|
This command verifies certificate chains.
|
1999-11-29 01:09:25 +00:00
|
|
|
|
2016-12-12 11:14:40 -05:00
|
|
|
=head1 OPTIONS
|
1999-11-29 01:09:25 +00:00
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
2016-02-05 11:58:45 -05:00
|
|
|
=item B<-help>
|
|
|
|
|
|
|
|
Print out a usage message.
|
|
|
|
|
2019-09-25 15:20:11 -04:00
|
|
|
=item B<-CRLfile> I<file>
|
2014-07-02 22:42:40 -04:00
|
|
|
|
2020-08-14 21:58:34 +02:00
|
|
|
The file or URI should contain one or more CRLs in PEM or DER format.
|
2016-01-16 01:15:02 -05:00
|
|
|
This option can be specified more than once to include CRLs from multiple
|
2019-10-01 18:16:29 +02:00
|
|
|
I<file>s.
|
2014-07-02 22:42:40 -04:00
|
|
|
|
2015-06-25 12:34:38 +01:00
|
|
|
=item B<-crl_download>
|
|
|
|
|
2020-03-06 21:46:33 +01:00
|
|
|
Attempt to download CRL information for certificates via their CDP entries.
|
2015-06-25 12:34:38 +01:00
|
|
|
|
2015-06-25 12:28:28 +01:00
|
|
|
=item B<-show_chain>
|
|
|
|
|
|
|
|
Display information about the certificate chain that has been built (if
|
|
|
|
successful). Certificates in the chain that came from the untrusted list will be
|
|
|
|
flagged as "untrusted".
|
|
|
|
|
2019-10-12 17:45:56 -04:00
|
|
|
=item B<-verbose>
|
2019-10-24 23:02:09 -04:00
|
|
|
|
2019-10-12 17:45:56 -04:00
|
|
|
Print extra information about the operations being performed.
|
|
|
|
|
|
|
|
=item B<-trusted> I<file>
|
|
|
|
|
2020-08-14 21:58:34 +02:00
|
|
|
A file or URI of trusted certificates in PEM, DER, or PKCS#12 format.
|
2020-03-06 21:46:33 +01:00
|
|
|
This option can be specified more than once to load certificates from multiple
|
|
|
|
I<file>s.
|
2019-10-12 17:45:56 -04:00
|
|
|
|
|
|
|
=item B<-untrusted> I<file>
|
|
|
|
|
2020-08-14 21:58:34 +02:00
|
|
|
A file or URI of untrusted certificates in PEM, DER, or PKCS#12 format
|
|
|
|
to use for chain building.
|
2020-03-06 21:46:33 +01:00
|
|
|
This option can be specified more than once to load certificates from multiple
|
|
|
|
I<file>s.
|
|
|
|
|
2019-10-12 17:45:56 -04:00
|
|
|
|
2020-03-10 23:08:59 +01:00
|
|
|
=item B<-vfyopt> I<nm>:I<v>
|
|
|
|
|
|
|
|
Pass options to the signature algorithm during verify operations.
|
|
|
|
Names and values of these options are algorithm-specific.
|
|
|
|
|
2019-10-12 17:45:56 -04:00
|
|
|
{- $OpenSSL::safe::opt_name_item -}
|
2019-10-24 23:02:09 -04:00
|
|
|
|
2019-10-12 17:45:56 -04:00
|
|
|
{- $OpenSSL::safe::opt_engine_item -}
|
2020-11-30 07:25:46 +01:00
|
|
|
{- output_off() if $disabled{"deprecated-3.0"}; "" -}
|
2019-10-12 17:45:56 -04:00
|
|
|
To load certificates or CRLs that require engine support, specify the
|
|
|
|
B<-engine> option before any of the
|
|
|
|
B<-trusted>, B<-untrusted> or B<-CRLfile> options.
|
2020-11-30 07:25:46 +01:00
|
|
|
{- output_on() if $disabled{"deprecated-3.0"}; "" -}
|
2019-10-12 17:45:56 -04:00
|
|
|
|
2019-10-12 17:45:56 -04:00
|
|
|
{- $OpenSSL::safe::opt_trust_item -}
|
|
|
|
|
|
|
|
{- $OpenSSL::safe::opt_v_item -}
|
|
|
|
|
2020-02-25 14:29:30 +10:00
|
|
|
{- $OpenSSL::safe::opt_provider_item -}
|
|
|
|
|
2019-10-02 17:13:03 +02:00
|
|
|
=item B<-->
|
1999-11-29 01:09:25 +00:00
|
|
|
|
2012-12-14 13:28:49 +00:00
|
|
|
Indicates the last option. All arguments following this are assumed to be
|
1999-11-30 02:28:42 +00:00
|
|
|
certificate files. This is useful if the first certificate filename begins
|
2019-10-12 17:45:56 -04:00
|
|
|
with a B<->.
|
1999-11-29 01:09:25 +00:00
|
|
|
|
2019-10-01 18:16:29 +02:00
|
|
|
=item I<certificate> ...
|
1999-11-29 01:09:25 +00:00
|
|
|
|
2019-12-23 15:40:47 +01:00
|
|
|
One or more target certificates to verify. If no certificates are given,
|
Command docs: fix up command references
Almost all OpenSSL commands are in reality 'openssl cmd', so make sure
they are refered to like that and not just as the sub-command.
Self-references are avoided as much as is possible, and replaced with
"this command". In some cases, we even avoid that with a slight
rewrite of the sentence or paragrah they were in. However, in the few
cases where a self-reference is still admissible, they are done in
bold, i.e. openssl-speed.pod references itself like this:
B<openssl speed>
References to other commands are done as manual links, i.e. CA.pl.pod
references 'openssl req' like this: L<openssl-req(1)>
Some commands are examples rather than references; we enclose those in
C<>.
While we are it, we abolish "utility", replacing it with "command", or
remove it entirely in some cases.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10065)
2019-10-01 19:43:36 +02:00
|
|
|
this command will attempt to read a certificate from standard input.
|
2019-12-23 15:40:47 +01:00
|
|
|
If a certificate chain has multiple problems, this program attempts to
|
2019-10-12 17:45:56 -04:00
|
|
|
display all of them.
|
1999-11-29 01:09:25 +00:00
|
|
|
|
|
|
|
=back
|
|
|
|
|
1999-11-30 02:28:42 +00:00
|
|
|
=head1 DIAGNOSTICS
|
|
|
|
|
|
|
|
When a verify operation fails the output messages can be somewhat cryptic. The
|
|
|
|
general form of the error message is:
|
|
|
|
|
|
|
|
server.pem: /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
|
|
|
|
error 24 at 1 depth lookup:invalid CA certificate
|
|
|
|
|
|
|
|
The first line contains the name of the certificate being verified followed by
|
|
|
|
the subject name of the certificate. The second line contains the error number
|
|
|
|
and the depth. The depth is number of the certificate being verified when a
|
2019-12-23 15:40:47 +01:00
|
|
|
problem was detected starting with zero for the target ("leaf") certificate
|
|
|
|
itself then 1 for the CA that signed the target certificate and so on.
|
|
|
|
Finally a textual version of the error number is presented.
|
1999-11-30 02:28:42 +00:00
|
|
|
|
2019-10-12 17:45:56 -04:00
|
|
|
A list of the error codes and messages can be found in
|
|
|
|
L<X509_STORE_CTX_get_error(3)>; the full list is defined in the header file
|
2019-10-01 20:19:45 +02:00
|
|
|
F<< <openssl/x509_vfy.h> >>.
|
1999-11-30 02:28:42 +00:00
|
|
|
|
2019-10-12 17:45:56 -04:00
|
|
|
This command ignores many errors, in order to allow all the problems with a
|
|
|
|
certificate chain to be determined.
|
1999-11-29 01:09:25 +00:00
|
|
|
|
2000-09-08 00:53:58 +00:00
|
|
|
=head1 BUGS
|
|
|
|
|
2017-03-30 07:38:30 +10:00
|
|
|
Although the issuer checks are a considerable improvement over the old
|
|
|
|
technique they still suffer from limitations in the underlying X509_LOOKUP
|
|
|
|
API. One consequence of this is that trusted certificates with matching
|
|
|
|
subject name must either appear in a file (as specified by the B<-CAfile>
|
2019-03-07 15:26:34 +01:00
|
|
|
option), a directory (as specified by B<-CApath>), or a store (as specified
|
|
|
|
by B<-CAstore>). If they occur in more than one location then only the
|
|
|
|
certificates in the file will be recognised.
|
2000-09-08 00:53:58 +00:00
|
|
|
|
2017-03-30 07:38:30 +10:00
|
|
|
Previous versions of OpenSSL assume certificates with matching subject
|
|
|
|
name are identical and mishandled them.
|
2000-09-08 00:53:58 +00:00
|
|
|
|
2010-02-23 14:09:09 +00:00
|
|
|
Previous versions of this documentation swapped the meaning of the
|
|
|
|
B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT> and
|
2016-05-25 14:29:57 -04:00
|
|
|
B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY> error codes.
|
2010-02-23 14:09:09 +00:00
|
|
|
|
1999-11-29 01:09:25 +00:00
|
|
|
=head1 SEE ALSO
|
|
|
|
|
2020-11-04 14:04:27 +01:00
|
|
|
L<openssl-verification-options(1)>,
|
2019-03-07 15:26:34 +01:00
|
|
|
L<openssl-x509(1)>,
|
|
|
|
L<ossl_store-file(7)>
|
1999-11-29 01:09:25 +00:00
|
|
|
|
2015-01-27 11:15:15 +00:00
|
|
|
=head1 HISTORY
|
|
|
|
|
2018-12-09 01:02:36 +01:00
|
|
|
The B<-show_chain> option was added in OpenSSL 1.1.0.
|
2016-02-09 14:17:13 -05:00
|
|
|
|
2020-06-25 11:27:51 +10:00
|
|
|
The B<-engine option> was deprecated in OpenSSL 3.0.
|
|
|
|
|
2016-05-18 11:44:05 -04:00
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
2020-04-23 13:55:52 +01:00
|
|
|
Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
|
2016-05-18 11:44:05 -04:00
|
|
|
|
2018-12-06 14:04:11 +01:00
|
|
|
Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-05-18 11:44:05 -04:00
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|