Import OpenSSL 1.1.0f
This commit is contained in:
213
doc/apps/ts.pod
213
doc/apps/ts.pod
@@ -12,8 +12,8 @@ B<-query>
|
||||
[B<-config> configfile]
|
||||
[B<-data> file_to_hash]
|
||||
[B<-digest> digest_bytes]
|
||||
[B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-mdc2>|B<-ripemd160>|B<...>]
|
||||
[B<-policy> object_id]
|
||||
[B<-[digest]>]
|
||||
[B<-tspolicy> object_id]
|
||||
[B<-no_nonce>]
|
||||
[B<-cert>]
|
||||
[B<-in> request.tsq]
|
||||
@@ -27,9 +27,10 @@ B<-reply>
|
||||
[B<-queryfile> request.tsq]
|
||||
[B<-passin> password_src]
|
||||
[B<-signer> tsa_cert.pem]
|
||||
[B<-inkey> private.pem]
|
||||
[B<-inkey> file_or_id]
|
||||
[B<-sha1|-sha224|-sha256|-sha384|-sha512>]
|
||||
[B<-chain> certs_file.pem]
|
||||
[B<-policy> object_id]
|
||||
[B<-tspolicy> object_id]
|
||||
[B<-in> response.tsr]
|
||||
[B<-token_in>]
|
||||
[B<-out> response.tsr]
|
||||
@@ -47,6 +48,38 @@ B<-verify>
|
||||
[B<-CApath> trusted_cert_path]
|
||||
[B<-CAfile> trusted_certs.pem]
|
||||
[B<-untrusted> cert_file.pem]
|
||||
[I<verify options>]
|
||||
|
||||
I<verify options:>
|
||||
[-attime timestamp]
|
||||
[-check_ss_sig]
|
||||
[-crl_check]
|
||||
[-crl_check_all]
|
||||
[-explicit_policy]
|
||||
[-extended_crl]
|
||||
[-ignore_critical]
|
||||
[-inhibit_any]
|
||||
[-inhibit_map]
|
||||
[-issuer_checks]
|
||||
[-no_alt_chains]
|
||||
[-no_check_time]
|
||||
[-partial_chain]
|
||||
[-policy arg]
|
||||
[-policy_check]
|
||||
[-policy_print]
|
||||
[-purpose purpose]
|
||||
[-suiteB_128]
|
||||
[-suiteB_128_only]
|
||||
[-suiteB_192]
|
||||
[-trusted_first]
|
||||
[-use_deltas]
|
||||
[-auth_level num]
|
||||
[-verify_depth num]
|
||||
[-verify_email email]
|
||||
[-verify_hostname hostname]
|
||||
[-verify_ip ip]
|
||||
[-verify_name name]
|
||||
[-x509_strict]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -106,9 +139,9 @@ MS-Windows, B<,> for VMS and B<:> for all other platforms. (Optional)
|
||||
|
||||
=item B<-config> configfile
|
||||
|
||||
The configuration file to use, this option overrides the
|
||||
B<OPENSSL_CONF> environment variable. Only the OID section
|
||||
of the config file is used with the B<-query> command. (Optional)
|
||||
The configuration file to use.
|
||||
Optional; for a description of the default value,
|
||||
see L<openssl(1)/COMMAND SUMMARY>.
|
||||
|
||||
=item B<-data> file_to_hash
|
||||
|
||||
@@ -121,16 +154,16 @@ parameter is specified. (Optional)
|
||||
It is possible to specify the message imprint explicitly without the data
|
||||
file. The imprint must be specified in a hexadecimal format, two characters
|
||||
per byte, the bytes optionally separated by colons (e.g. 1A:F6:01:... or
|
||||
1AF601...). The number of bytes must match the message digest algorithm
|
||||
1AF601...). The number of bytes must match the message digest algorithm
|
||||
in use. (Optional)
|
||||
|
||||
=item B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-mdc2>|B<-ripemd160>|B<...>
|
||||
=item B<-[digest]>
|
||||
|
||||
The message digest to apply to the data file, it supports all the message
|
||||
digest algorithms that are supported by the openssl B<dgst> command.
|
||||
The message digest to apply to the data file.
|
||||
Any digest supported by the OpenSSL B<dgst> command can be used.
|
||||
The default is SHA-1. (Optional)
|
||||
|
||||
=item B<-policy> object_id
|
||||
=item B<-tspolicy> object_id
|
||||
|
||||
The policy that the client expects the TSA to use for creating the
|
||||
time stamp token. Either the dotted OID notation or OID names defined
|
||||
@@ -154,7 +187,6 @@ response. (Optional)
|
||||
This option specifies a previously created time stamp request in DER
|
||||
format that will be printed into the output file. Useful when you need
|
||||
to examine the content of a request in human-readable
|
||||
|
||||
format. (Optional)
|
||||
|
||||
=item B<-out> request.tsq
|
||||
@@ -183,13 +215,14 @@ otherwise it is a time stamp token (ContentInfo).
|
||||
|
||||
=item B<-config> configfile
|
||||
|
||||
The configuration file to use, this option overrides the
|
||||
B<OPENSSL_CONF> environment variable. See B<CONFIGURATION FILE
|
||||
OPTIONS> for configurable variables. (Optional)
|
||||
The configuration file to use.
|
||||
Optional; for a description of the default value,
|
||||
see L<openssl(1)/COMMAND SUMMARY>.
|
||||
See B<CONFIGURATION FILE OPTIONS> for configurable variables.
|
||||
|
||||
=item B<-section> tsa_section
|
||||
|
||||
The name of the config file section conatining the settings for the
|
||||
The name of the config file section containing the settings for the
|
||||
response generation. If not specified the default TSA section is
|
||||
used, see B<CONFIGURATION FILE OPTIONS> for details. (Optional)
|
||||
|
||||
@@ -200,7 +233,7 @@ The name of the file containing a DER encoded time stamp request. (Optional)
|
||||
=item B<-passin> password_src
|
||||
|
||||
Specifies the password source for the private key of the TSA. See
|
||||
B<PASS PHRASE ARGUMENTS> in L<openssl(1)|openssl(1)>. (Optional)
|
||||
B<PASS PHRASE ARGUMENTS> in L<openssl(1)>. (Optional)
|
||||
|
||||
=item B<-signer> tsa_cert.pem
|
||||
|
||||
@@ -210,10 +243,17 @@ timeStamping. The extended key usage must also be critical, otherwise
|
||||
the certificate is going to be refused. Overrides the B<signer_cert>
|
||||
variable of the config file. (Optional)
|
||||
|
||||
=item B<-inkey> private.pem
|
||||
=item B<-inkey> file_or_id
|
||||
|
||||
The signer private key of the TSA in PEM format. Overrides the
|
||||
B<signer_key> config file option. (Optional)
|
||||
If no engine is used, the argument is taken as a file; if an engine is
|
||||
specified, the argument is given to the engine as a key identifier.
|
||||
|
||||
=item B<-sha1|-sha224|-sha256|-sha384|-sha512>
|
||||
|
||||
Signing digest to use. Overrides the B<signer_digest> config file
|
||||
option. (Optional)
|
||||
|
||||
=item B<-chain> certs_file.pem
|
||||
|
||||
@@ -224,7 +264,7 @@ contain the certificate chain for the signer certificate from its
|
||||
issuer upwards. The B<-reply> command does not build a certificate
|
||||
chain automatically. (Optional)
|
||||
|
||||
=item B<-policy> object_id
|
||||
=item B<-tspolicy> object_id
|
||||
|
||||
The default policy to use for the response unless the client
|
||||
explicitly requires a particular TSA policy. The OID can be specified
|
||||
@@ -283,7 +323,7 @@ data file. The B<-verify> command does not use the configuration file.
|
||||
=item B<-data> file_to_hash
|
||||
|
||||
The response or token must be verified against file_to_hash. The file
|
||||
is hashed with the message digest algorithm specified in the token.
|
||||
is hashed with the message digest algorithm specified in the token.
|
||||
The B<-digest> and B<-queryfile> options must not be specified with this one.
|
||||
(Optional)
|
||||
|
||||
@@ -311,16 +351,16 @@ of a time stamp response (TimeStampResp). (Optional)
|
||||
|
||||
=item B<-CApath> trusted_cert_path
|
||||
|
||||
The name of the directory containing the trused CA certificates of the
|
||||
client. See the similar option of L<verify(1)|verify(1)> for additional
|
||||
The name of the directory containing the trusted CA certificates of the
|
||||
client. See the similar option of L<verify(1)> for additional
|
||||
details. Either this option or B<-CAfile> must be specified. (Optional)
|
||||
|
||||
|
||||
=item B<-CAfile> trusted_certs.pem
|
||||
|
||||
The name of the file containing a set of trusted self-signed CA
|
||||
certificates in PEM format. See the similar option of
|
||||
L<verify(1)|verify(1)> for additional details. Either this option
|
||||
The name of the file containing a set of trusted self-signed CA
|
||||
certificates in PEM format. See the similar option of
|
||||
L<verify(1)> for additional details. Either this option
|
||||
or B<-CApath> must be specified.
|
||||
(Optional)
|
||||
|
||||
@@ -332,12 +372,24 @@ certificate. This file must contain the TSA signing certificate and
|
||||
all intermediate CA certificates unless the response includes them.
|
||||
(Optional)
|
||||
|
||||
=item I<verify options>
|
||||
|
||||
The options B<-attime timestamp>, B<-check_ss_sig>, B<-crl_check>,
|
||||
B<-crl_check_all>, B<-explicit_policy>, B<-extended_crl>, B<-ignore_critical>,
|
||||
B<-inhibit_any>, B<-inhibit_map>, B<-issuer_checks>, B<-no_alt_chains>,
|
||||
B<-no_check_time>, B<-partial_chain>, B<-policy>, B<-policy_check>,
|
||||
B<-policy_print>, B<-purpose>, B<-suiteB_128>, B<-suiteB_128_only>,
|
||||
B<-suiteB_192>, B<-trusted_first>, B<-use_deltas>, B<-auth_level>,
|
||||
B<-verify_depth>, B<-verify_email>, B<-verify_hostname>, B<-verify_ip>,
|
||||
B<-verify_name>, and B<-x509_strict> can be used to control timestamp
|
||||
verification. See L<verify(1)>.
|
||||
|
||||
=back
|
||||
|
||||
=head1 CONFIGURATION FILE OPTIONS
|
||||
|
||||
The B<-query> and B<-reply> commands make use of a configuration file
|
||||
defined by the B<OPENSSL_CONF> environment variable. See L<config(5)|config(5)>
|
||||
The B<-query> and B<-reply> commands make use of a configuration file.
|
||||
See L<config(5)>
|
||||
for a general description of the syntax of the config file. The
|
||||
B<-query> command uses only the symbolic OID names section
|
||||
and it can work without it. However, the B<-reply> command needs the
|
||||
@@ -348,7 +400,7 @@ switch always overrides the settings in the config file.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<tsa> section, B<default_tsa>
|
||||
=item B<tsa> section, B<default_tsa>
|
||||
|
||||
This is the main section and it specifies the name of another section
|
||||
that contains all the options for the B<-reply> command. This default
|
||||
@@ -356,15 +408,15 @@ section can be overridden with the B<-section> command line switch. (Optional)
|
||||
|
||||
=item B<oid_file>
|
||||
|
||||
See L<ca(1)|ca(1)> for description. (Optional)
|
||||
See L<ca(1)> for description. (Optional)
|
||||
|
||||
=item B<oid_section>
|
||||
|
||||
See L<ca(1)|ca(1)> for description. (Optional)
|
||||
See L<ca(1)> for description. (Optional)
|
||||
|
||||
=item B<RANDFILE>
|
||||
|
||||
See L<ca(1)|ca(1)> for description. (Optional)
|
||||
See L<ca(1)> for description. (Optional)
|
||||
|
||||
=item B<serial>
|
||||
|
||||
@@ -375,8 +427,8 @@ generation a new file is created with serial number 1. (Mandatory)
|
||||
|
||||
=item B<crypto_device>
|
||||
|
||||
Specifies the OpenSSL engine that will be set as the default for
|
||||
all available algorithms. The default value is builtin, you can specify
|
||||
Specifies the OpenSSL engine that will be set as the default for
|
||||
all available algorithms. The default value is builtin, you can specify
|
||||
any other engines supported by OpenSSL (e.g. use chil for the NCipher HSM).
|
||||
(Optional)
|
||||
|
||||
@@ -396,10 +448,15 @@ option. (Optional)
|
||||
The private key of the TSA in PEM format. The same as the B<-inkey>
|
||||
command line option. (Optional)
|
||||
|
||||
=item B<signer_digest>
|
||||
|
||||
Signing digest to use. The same as the
|
||||
B<-sha1|-sha224|-sha256|-sha384|-sha512> command line option. (Optional)
|
||||
|
||||
=item B<default_policy>
|
||||
|
||||
The default policy to use when the request does not mandate any
|
||||
policy. The same as the B<-policy> command line option. (Optional)
|
||||
policy. The same as the B<-tspolicy> command line option. (Optional)
|
||||
|
||||
=item B<other_policies>
|
||||
|
||||
@@ -419,7 +476,7 @@ the components is missing zero is assumed for that field. (Optional)
|
||||
|
||||
=item B<clock_precision_digits>
|
||||
|
||||
Specifies the maximum number of digits, which represent the fraction of
|
||||
Specifies the maximum number of digits, which represent the fraction of
|
||||
seconds, that need to be included in the time field. The trailing zeroes
|
||||
must be removed from the time, so there might actually be fewer digits,
|
||||
or no fraction of seconds at all. Supported only on UNIX platforms.
|
||||
@@ -450,42 +507,37 @@ included. Default is no. (Optional)
|
||||
|
||||
=back
|
||||
|
||||
=head1 ENVIRONMENT VARIABLES
|
||||
|
||||
B<OPENSSL_CONF> contains the path of the configuration file and can be
|
||||
overridden by the B<-config> command line option.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
All the examples below presume that B<OPENSSL_CONF> is set to a proper
|
||||
configuration file, e.g. the example configuration file
|
||||
configuration file, e.g. the example configuration file
|
||||
openssl/apps/openssl.cnf will do.
|
||||
|
||||
=head2 Time Stamp Request
|
||||
|
||||
To create a time stamp request for design1.txt with SHA-1
|
||||
To create a time stamp request for design1.txt with SHA-1
|
||||
without nonce and policy and no certificate is required in the response:
|
||||
|
||||
openssl ts -query -data design1.txt -no_nonce \
|
||||
-out design1.tsq
|
||||
-out design1.tsq
|
||||
|
||||
To create a similar time stamp request with specifying the message imprint
|
||||
explicitly:
|
||||
|
||||
openssl ts -query -digest b7e5d3f93198b38379852f2c04e78d73abdd0f4b \
|
||||
-no_nonce -out design1.tsq
|
||||
-no_nonce -out design1.tsq
|
||||
|
||||
To print the content of the previous request in human readable format:
|
||||
|
||||
openssl ts -query -in design1.tsq -text
|
||||
|
||||
To create a time stamp request which includes the MD-5 digest
|
||||
To create a time stamp request which includes the MD-5 digest
|
||||
of design2.txt, requests the signer certificate and nonce,
|
||||
specifies a policy id (assuming the tsa_policy1 name is defined in the
|
||||
OID section of the config file):
|
||||
|
||||
openssl ts -query -data design2.txt -md5 \
|
||||
-policy tsa_policy1 -cert -out design2.tsq
|
||||
-tspolicy tsa_policy1 -cert -out design2.tsq
|
||||
|
||||
=head2 Time Stamp Response
|
||||
|
||||
@@ -493,8 +545,8 @@ Before generating a response a signing certificate must be created for
|
||||
the TSA that contains the B<timeStamping> critical extended key usage extension
|
||||
without any other key usage extensions. You can add the
|
||||
'extendedKeyUsage = critical,timeStamping' line to the user certificate section
|
||||
of the config file to generate a proper certificate. See L<req(1)|req(1)>,
|
||||
L<ca(1)|ca(1)>, L<x509(1)|x509(1)> for instructions. The examples
|
||||
of the config file to generate a proper certificate. See L<req(1)>,
|
||||
L<ca(1)>, L<x509(1)> for instructions. The examples
|
||||
below assume that cacert.pem contains the certificate of the CA,
|
||||
tsacert.pem is the signing certificate issued by cacert.pem and
|
||||
tsakey.pem is the private key of the TSA.
|
||||
@@ -502,7 +554,7 @@ tsakey.pem is the private key of the TSA.
|
||||
To create a time stamp response for a request:
|
||||
|
||||
openssl ts -reply -queryfile design1.tsq -inkey tsakey.pem \
|
||||
-signer tsacert.pem -out design1.tsr
|
||||
-signer tsacert.pem -out design1.tsr
|
||||
|
||||
If you want to use the settings in the config file you could just write:
|
||||
|
||||
@@ -534,61 +586,76 @@ valid response:
|
||||
To verify a time stamp reply against a request:
|
||||
|
||||
openssl ts -verify -queryfile design1.tsq -in design1.tsr \
|
||||
-CAfile cacert.pem -untrusted tsacert.pem
|
||||
-CAfile cacert.pem -untrusted tsacert.pem
|
||||
|
||||
To verify a time stamp reply that includes the certificate chain:
|
||||
|
||||
openssl ts -verify -queryfile design2.tsq -in design2.tsr \
|
||||
-CAfile cacert.pem
|
||||
-CAfile cacert.pem
|
||||
|
||||
To verify a time stamp token against the original data file:
|
||||
openssl ts -verify -data design2.txt -in design2.tsr \
|
||||
-CAfile cacert.pem
|
||||
-CAfile cacert.pem
|
||||
|
||||
To verify a time stamp token against a message imprint:
|
||||
openssl ts -verify -digest b7e5d3f93198b38379852f2c04e78d73abdd0f4b \
|
||||
-in design2.tsr -CAfile cacert.pem
|
||||
-in design2.tsr -CAfile cacert.pem
|
||||
|
||||
You could also look at the 'test' directory for more examples.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
=for comment foreign manuals: procmail(1), perl(1)
|
||||
|
||||
If you find any bugs or you have suggestions please write to
|
||||
Zoltan Glozik <zglozik@opentsa.org>. Known issues:
|
||||
|
||||
=over 4
|
||||
=over 2
|
||||
|
||||
=item * No support for time stamps over SMTP, though it is quite easy
|
||||
to implement an automatic e-mail based TSA with L<procmail(1)|procmail(1)>
|
||||
and L<perl(1)|perl(1)>. HTTP server support is provided in the form of
|
||||
=item *
|
||||
|
||||
No support for time stamps over SMTP, though it is quite easy
|
||||
to implement an automatic e-mail based TSA with L<procmail(1)>
|
||||
and L<perl(1)>. HTTP server support is provided in the form of
|
||||
a separate apache module. HTTP client support is provided by
|
||||
L<tsget(1)|tsget(1)>. Pure TCP/IP protocol is not supported.
|
||||
L<tsget(1)>. Pure TCP/IP protocol is not supported.
|
||||
|
||||
=item * The file containing the last serial number of the TSA is not
|
||||
=item *
|
||||
|
||||
The file containing the last serial number of the TSA is not
|
||||
locked when being read or written. This is a problem if more than one
|
||||
instance of L<openssl(1)|openssl(1)> is trying to create a time stamp
|
||||
instance of L<openssl(1)> is trying to create a time stamp
|
||||
response at the same time. This is not an issue when using the apache
|
||||
server module, it does proper locking.
|
||||
|
||||
=item * Look for the FIXME word in the source files.
|
||||
=item *
|
||||
|
||||
=item * The source code should really be reviewed by somebody else, too.
|
||||
Look for the FIXME word in the source files.
|
||||
|
||||
=item * More testing is needed, I have done only some basic tests (see
|
||||
=item *
|
||||
|
||||
The source code should really be reviewed by somebody else, too.
|
||||
|
||||
=item *
|
||||
|
||||
More testing is needed, I have done only some basic tests (see
|
||||
test/testtsa).
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Zoltan Glozik <zglozik@opentsa.org>, OpenTSA project (http://www.opentsa.org)
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<tsget(1)|tsget(1)>, L<openssl(1)|openssl(1)>, L<req(1)|req(1)>,
|
||||
L<x509(1)|x509(1)>, L<ca(1)|ca(1)>, L<genrsa(1)|genrsa(1)>,
|
||||
L<config(5)|config(5)>
|
||||
L<tsget(1)>, L<openssl(1)>, L<req(1)>,
|
||||
L<x509(1)>, L<ca(1)>, L<genrsa(1)>,
|
||||
L<config(5)>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2006-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the OpenSSL license (the "License"). You may not use
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user