The mod_tsa module provides HTTP (and possibly HTTPS) interface for the Time Stamping Authority implemented by OpenSSL. The module can be accessed by sending a valid DER encoded RFC 3161-based time stamp request in an application/timestamp-query MIME message using PUT method. The response is an application/timestamp-reply MIME message containing the DER encoded time stamp response. If the request were processed successfully the response would also contain the time stamp token, the evidence for the existence of the related datum before the date indicated in the token. The status field of the response indicates if the request processing was successful.
When starting up mod_tsa writes information about the parsed configuration options into the Apache error log at NOTICE level. All invocations of the mod_tsa request handler are logged at DEBUG level. If a fatal error occurs during initialization Apache is stopped and the cause of error is logged at ERR log level.
The module also supports hardware accelerators and hardware security modules through the OpenSSL engine framework, look at the TSACryptoDevice directive.
Beside specifying the directives below, you must also assign the tsa request handler to a location, otherwise it will never be called. If you want your TSA to be accessible from anywhere at the http://your_server:your_port/tsa URL, you could write:
<Location /tsa> SetHandler tsa Order allow,deny Allow from all </Location>
The tsa.conf file included in the mod_tsa distribution contains a ready-to-use set up. The recommended way of setting up mod_tsa is to include the tsa.conf file from httpd.conf. You can do this by adding the following line to your Apache config file:
Include path_to_tsa_conf
You must also make sure that the LoadModule directive, which loads mod_tsa.so, appears before the above Include line in httpd.conf.
The module includes support for storing all the returned time stamp tokens in a MySQL table called token. The table has the following fields:
Field | Value |
---|---|
token_id | The unique serial number of the token. |
token_date | The date and time of the token excluding the fraction of seconds. |
token_pkcs7 | The DER encoded PKCS7 time stamp token in binary format. |
The module includes support for storing all the returned time stamp tokens in a FireBird database table called tsa_events. The table has the following fields:
Field | Value |
---|---|
token_id | The unique serial number of the token. |
token_date | The date and time of the token excluding the fraction of seconds. |
token_pkcs7 | The DER encoded PKCS7 time stamp token in binary format. |
The module includes support for storing all the returned time stamp tokens in a PostgreSQL table called token. The table has the following fields:
Field | Value |
---|---|
token_id | The unique serial number of the token. |
token_date | The date and time of the token excluding the fraction of seconds. |
token_pkcs7 | The DER encoded PKCS7 time stamp token in binary format (bytea). |
File for storing serial numbers for time stamp response generation. The file is updated every time a response is generated. If the file does not exist mod_tsa tries to create and initialise it with 0.
The identifier of the OpenSSL engine to use for cryptographic operations. The signing private key must be available on this engine. Any engine types supported by OpenSSL can be specified here, specify "builtin" for the default software engine.
PEM-encoded certificate used by the TSA for signing responses. It must have timeStamping extended key usage.
Collection of PEM-encoded certificates containing the certificate path for the TSA signing certificate excluding the TSA cert. The TSA certificate and these certificates are included in the SignedData if the time stamp query requests it.
The private key of the TSA, it must match the public key of the TSA certificate. If the key file is protected by a pass phrase (highly recommended) the TSAKeyPassPhrase switch must be turned on.
This switch specifies if the TSA private key is protected by a passphrase. If this switch is turned on a passphrase must be entered when Apache is being started.
The OID of the default TSA policy that is used in responses if the request does not specify any policy. You must explicitly specify an OID for this option.
List of TSA policy OIDs that are acceptable by the TSA in addition to the default policy. These are returned only if the client explicitly requests one of them.
List of message digests that the TSA accepts. The supported algorithms are: md2, md4, md5, sha, sha1, mdc2, ripemd160.
Accuracy of the TSA time source in seconds, milliseconds and microseconds.
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. The maximum permitted value is 6.
Specifies whether the ordering field should be set in time stamp responses.
Specifies if the TSA name should be included in the responses. If this switched is turned on the subject name of the TSA certificate will be included in the time stamp response as the TSA name.
Specifies if ESS certificate identifiers should be included for the certificate chain as well beside the signing certificate. The certificate identifier list is generated based on the certificates specified by TSACertificateChain. If this flag is turned off only the signing certificate identifier is included in the ESS SigningCertificate signed attribute.
Specifies the module to be used for storing the time stamp tokens. If you specify None the tokens are not stored in a database.
(Only if TSADBModule is MySQL) Specifies the IP address or DNS of the MySQL host used for storing the time stamp tokens.
(Only if TSADBModule is MySQL) Specifies the TCP port on which MySQL is listening. Not used if server is localhost.
(Only if TSADBModule is MySQL) Specifies the local UNIX domain socket on which MySQL is listening. Used only if MySQL is running on the localhost.
(Only if TSADBModule is MySQL) The MySQL user name to be used for connecting to the database.
(Only if TSADBModule is MySQL) Name of the MySQL database for storing the tokens.
(Only if TSADBModule is MySQL) Specifies whether a password must be entered at startup for connecting to the MySQL database.
(Only if TSADBModule is FireBird) Specifies the IP address or DNS of the FireBird host used for storing the time stamp tokens.
(Only if TSADBModule is FireBird) Specifies the TCP port on which the FireBird server is listening. Not used if server is localhost.
(Only if TSADBModule is FireBird) Specifies the local UNIX domain socket on which the FireBird server is listening. Used only if server is running on the localhost.
(Only if TSADBModule is FireBird) The FireBird user name to be used for connecting to the database.
(Only if TSADBModule is FireBird) Name of the FireBird database for storing the tokens.
(Only if TSADBModule is FireBird) Specifies whether a password must be entered at startup for connecting to the FireBird database.
(Only if TSADBModule is PostgreSQL) Specifies the IP address or DNS of the PostgreSQL host used for storing the time stamp tokens.
(Only if TSADBModule is PostgreSQL) Specifies the TCP port on which PostgreSQL is listening.
(Only if TSADBModule is PostgreSQL) The PostgreSQL user name to be used for connecting to the database.
(Only if TSADBModule is PostgreSQL) Name of the PostgreSQL database for storing the tokens.
(Only if TSADBModule is PostgreSQL) Specifies whether a password must be entered at startup for connecting to the PostgreSQL database.