diff options
Diffstat (limited to '')
| -rw-r--r-- | src/usr.sbin/openssl/openssl.1 | 633 |
1 files changed, 629 insertions, 4 deletions
diff --git a/src/usr.sbin/openssl/openssl.1 b/src/usr.sbin/openssl/openssl.1 index 015adda638..9934bb6a10 100644 --- a/src/usr.sbin/openssl/openssl.1 +++ b/src/usr.sbin/openssl/openssl.1 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: openssl.1,v 1.79 2010/10/14 20:41:28 jmc Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.80 2010/10/15 18:17:10 jmc Exp $ |
| 2 | .\" ==================================================================== | 2 | .\" ==================================================================== |
| 3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
| 4 | .\" | 4 | .\" |
| @@ -112,7 +112,7 @@ | |||
| 112 | .\" | 112 | .\" |
| 113 | .\" OPENSSL | 113 | .\" OPENSSL |
| 114 | .\" | 114 | .\" |
| 115 | .Dd $Mdocdate: October 14 2010 $ | 115 | .Dd $Mdocdate: October 15 2010 $ |
| 116 | .Dt OPENSSL 1 | 116 | .Dt OPENSSL 1 |
| 117 | .Os | 117 | .Os |
| 118 | .Sh NAME | 118 | .Sh NAME |
| @@ -365,6 +365,8 @@ S/MIME mail processing. | |||
| 365 | Algorithm speed measurement. | 365 | Algorithm speed measurement. |
| 366 | .It Cm spkac | 366 | .It Cm spkac |
| 367 | SPKAC printing and generating utility. | 367 | SPKAC printing and generating utility. |
| 368 | .It Cm ts | ||
| 369 | Time stamping authority tool (client/server). | ||
| 368 | .It Cm verify | 370 | .It Cm verify |
| 369 | X.509 certificate verification. | 371 | X.509 certificate verification. |
| 370 | .It Cm version | 372 | .It Cm version |
| @@ -5193,8 +5195,12 @@ Print out text version of parameters: | |||
| 5193 | $ openssl pkeyparam -in param.pem -text | 5195 | $ openssl pkeyparam -in param.pem -text |
| 5194 | .Ed | 5196 | .Ed |
| 5195 | .Sh PKEYPARAM NOTES | 5197 | .Sh PKEYPARAM NOTES |
| 5196 | There are no B<-inform> or B<-outform> options for this command because only | 5198 | There are no |
| 5197 | PEM format is supported because the key type is determined by the PEM headers. | 5199 | .Fl inform |
| 5200 | or | ||
| 5201 | .Fl outform | ||
| 5202 | options for this command because only PEM format is supported | ||
| 5203 | because the key type is determined by the PEM headers. | ||
| 5198 | .\" | 5204 | .\" |
| 5199 | .\" PKEYUTL | 5205 | .\" PKEYUTL |
| 5200 | .\" | 5206 | .\" |
| @@ -8266,6 +8272,625 @@ Run | |||
| 8266 | benchmarks in parallel. | 8272 | benchmarks in parallel. |
| 8267 | .El | 8273 | .El |
| 8268 | .\" | 8274 | .\" |
| 8275 | .\" TS | ||
| 8276 | .\" | ||
| 8277 | .Sh TS | ||
| 8278 | .nr nS 1 | ||
| 8279 | .Nm "openssl ts" | ||
| 8280 | .Bk -words | ||
| 8281 | .Fl query | ||
| 8282 | .Op Fl md4 | md5 | ripemd160 | sha | sha1 | ||
| 8283 | .Op Fl cert | ||
| 8284 | .Op Fl no_nonce | ||
| 8285 | .Op Fl text | ||
| 8286 | .Op Fl config Ar configfile | ||
| 8287 | .Op Fl data Ar file_to_hash | ||
| 8288 | .Op Fl digest Ar digest_bytes | ||
| 8289 | .Op Fl in Ar request.tsq | ||
| 8290 | .Op Fl out Ar request.tsq | ||
| 8291 | .Op Fl policy Ar object_id | ||
| 8292 | .Op Fl rand Ar file : Ns Ar file | ||
| 8293 | .Ek | ||
| 8294 | .nr nS 0 | ||
| 8295 | .Pp | ||
| 8296 | .nr nS 1 | ||
| 8297 | .Nm "openssl ts" | ||
| 8298 | .Bk -words | ||
| 8299 | .Fl reply | ||
| 8300 | .Op Fl text | ||
| 8301 | .Op Fl token_in | ||
| 8302 | .Op Fl token_out | ||
| 8303 | .Op Fl chain Ar certs_file.pem | ||
| 8304 | .Op Fl config Ar configfile | ||
| 8305 | .Op Fl engine Ar id | ||
| 8306 | .Op Fl in Ar response.tsr | ||
| 8307 | .Op Fl inkey Ar private.pem | ||
| 8308 | .Op Fl out Ar response.tsr | ||
| 8309 | .Op Fl passin Ar password_src | ||
| 8310 | .Op Fl policy Ar object_id | ||
| 8311 | .Op Fl queryfile Ar request.tsq | ||
| 8312 | .Op Fl section Ar tsa_section | ||
| 8313 | .Op Fl signer Ar tsa_cert.pem | ||
| 8314 | .Ek | ||
| 8315 | .nr nS 0 | ||
| 8316 | .Pp | ||
| 8317 | .nr nS 1 | ||
| 8318 | .Nm "openssl ts" | ||
| 8319 | .Bk -words | ||
| 8320 | .Fl verify | ||
| 8321 | .Op Fl token_in | ||
| 8322 | .Op Fl CAfile Ar trusted_certs.pem | ||
| 8323 | .Op Fl CApath Ar trusted_cert_path | ||
| 8324 | .Op Fl data Ar file_to_hash | ||
| 8325 | .Op Fl digest Ar digest_bytes | ||
| 8326 | .Op Fl in Ar response.tsr | ||
| 8327 | .Op Fl queryfile Ar request.tsq | ||
| 8328 | .Op Fl untrusted Ar cert_file.pem | ||
| 8329 | .Ek | ||
| 8330 | .nr nS 0 | ||
| 8331 | .Pp | ||
| 8332 | The | ||
| 8333 | .Nm ts | ||
| 8334 | command is a basic Time Stamping Authority (TSA) client and server | ||
| 8335 | application as specified in RFC 3161 (Time-Stamp Protocol, TSP). | ||
| 8336 | A TSA can be part of a PKI deployment and its role is to provide long | ||
| 8337 | term proof of the existence of a certain datum before a particular time. | ||
| 8338 | Here is a brief description of the protocol: | ||
| 8339 | .Bl -enum | ||
| 8340 | .It | ||
| 8341 | The TSA client computes a one-way hash value for a data file and sends | ||
| 8342 | the hash to the TSA. | ||
| 8343 | .It | ||
| 8344 | The TSA attaches the current date and time to the received hash value, | ||
| 8345 | signs them and sends the time stamp token back to the client. | ||
| 8346 | By creating this token the TSA certifies the existence of the original | ||
| 8347 | data file at the time of response generation. | ||
| 8348 | .It | ||
| 8349 | The TSA client receives the time stamp token and verifies the | ||
| 8350 | signature on it. | ||
| 8351 | It also checks if the token contains the same hash | ||
| 8352 | value that it had sent to the TSA. | ||
| 8353 | .El | ||
| 8354 | .Pp | ||
| 8355 | There is one DER encoded protocol data unit defined for transporting a time | ||
| 8356 | stamp request to the TSA and one for sending the time stamp response | ||
| 8357 | back to the client. | ||
| 8358 | The | ||
| 8359 | .Nm ts | ||
| 8360 | command has three main functions: | ||
| 8361 | creating a time stamp request based on a data file; | ||
| 8362 | creating a time stamp response based on a request; | ||
| 8363 | and verifying if a response corresponds | ||
| 8364 | to a particular request or a data file. | ||
| 8365 | .Pp | ||
| 8366 | There is no support for sending the requests/responses automatically | ||
| 8367 | over HTTP or TCP yet as suggested in RFC 3161. | ||
| 8368 | Users must send the requests either by FTP or email. | ||
| 8369 | .Pp | ||
| 8370 | The | ||
| 8371 | .Fl query | ||
| 8372 | switch can be used for creating and printing a time stamp | ||
| 8373 | request with the following options: | ||
| 8374 | .Bl -tag -width Ds | ||
| 8375 | .It Fl cert | ||
| 8376 | The TSA is expected to include its signing certificate in the | ||
| 8377 | response. | ||
| 8378 | .It Fl config Ar configfile | ||
| 8379 | The configuration file to use. | ||
| 8380 | This option overrides the | ||
| 8381 | .Ev OPENSSL_CONF | ||
| 8382 | environment variable. | ||
| 8383 | Only the OID section of the config file is used with the | ||
| 8384 | .Fl query | ||
| 8385 | command. | ||
| 8386 | .It Fl data Ar file_to_hash | ||
| 8387 | The data file for which the time stamp request needs to be created. | ||
| 8388 | stdin is the default if neither the | ||
| 8389 | .Fl data | ||
| 8390 | nor the | ||
| 8391 | .Fl digest | ||
| 8392 | option is specified. | ||
| 8393 | .It Fl digest Ar digest_bytes | ||
| 8394 | It is possible to specify the message imprint explicitly without the data | ||
| 8395 | file. | ||
| 8396 | The imprint must be specified in a hexadecimal format, | ||
| 8397 | two characters per byte, | ||
| 8398 | the bytes optionally separated by colons (e.g. 1A:F6:01:... or 1AF601...). | ||
| 8399 | The number of bytes must match the message digest algorithm in use. | ||
| 8400 | .It Fl in Ar request.tsq | ||
| 8401 | This option specifies a previously created time stamp request in DER | ||
| 8402 | format that will be printed into the output file. | ||
| 8403 | Useful when you need to examine the content of a request in human-readable | ||
| 8404 | format. | ||
| 8405 | .It Fl md4|md5|ripemd160|sha|sha1 | ||
| 8406 | The message digest to apply to the data file. | ||
| 8407 | It supports all the message digest algorithms that are supported by the | ||
| 8408 | .Nm dgst | ||
| 8409 | command. | ||
| 8410 | The default is SHA-1. | ||
| 8411 | .It Fl no_nonce | ||
| 8412 | No nonce is specified in the request if this option is given. | ||
| 8413 | Otherwise a 64-bit long pseudo-random none is | ||
| 8414 | included in the request. | ||
| 8415 | It is recommended to use nonce to protect against replay-attacks. | ||
| 8416 | .It Fl out Ar request.tsq | ||
| 8417 | Name of the output file to which the request will be written. | ||
| 8418 | The default is stdout. | ||
| 8419 | .It Fl policy Ar object_id | ||
| 8420 | The policy that the client expects the TSA to use for creating the | ||
| 8421 | time stamp token. | ||
| 8422 | Either the dotted OID notation or OID names defined | ||
| 8423 | in the config file can be used. | ||
| 8424 | If no policy is requested the TSA will | ||
| 8425 | use its own default policy. | ||
| 8426 | .It Fl rand Ar file : Ns Ar file | ||
| 8427 | The files containing random data for seeding the random number generator. | ||
| 8428 | Multiple files can be specified. | ||
| 8429 | The separator is | ||
| 8430 | .Sq \&; | ||
| 8431 | for MS-Windows; | ||
| 8432 | .Sq \&, | ||
| 8433 | for VMS; and | ||
| 8434 | .Sq \&: | ||
| 8435 | for all other platforms. | ||
| 8436 | .It Fl text | ||
| 8437 | If this option is specified the output is in human-readable text format | ||
| 8438 | instead of DER. | ||
| 8439 | .El | ||
| 8440 | .Pp | ||
| 8441 | A time stamp response (TimeStampResp) consists of a response status | ||
| 8442 | and the time stamp token itself (ContentInfo), | ||
| 8443 | if the token generation was successful. | ||
| 8444 | The | ||
| 8445 | .Fl reply | ||
| 8446 | command is for creating a time stamp | ||
| 8447 | response or time stamp token based on a request and printing the | ||
| 8448 | response/token in human-readable format. | ||
| 8449 | If | ||
| 8450 | .Fl token_out | ||
| 8451 | is not specified the output is always a time stamp response (TimeStampResp), | ||
| 8452 | otherwise it is a time stamp token (ContentInfo). | ||
| 8453 | .Bl -tag -width Ds | ||
| 8454 | .It Fl chain Ar certs_file.pem | ||
| 8455 | The collection of certificates, in PEM format, | ||
| 8456 | that will be included in the response | ||
| 8457 | in addition to the signer certificate if the | ||
| 8458 | .Fl cert | ||
| 8459 | option was used for the request. | ||
| 8460 | This file is supposed to contain the certificate chain | ||
| 8461 | for the signer certificate from its issuer upwards. | ||
| 8462 | The | ||
| 8463 | .Fl reply | ||
| 8464 | command does not build a certificate chain automatically. | ||
| 8465 | .It Fl config Ar configfile | ||
| 8466 | The configuration file to use. | ||
| 8467 | This option overrides the | ||
| 8468 | .Ev OPENSSL_CONF | ||
| 8469 | environment variable. | ||
| 8470 | See | ||
| 8471 | .Sx TS CONFIGURATION FILE OPTIONS | ||
| 8472 | for configurable variables. | ||
| 8473 | .It Fl engine Ar id | ||
| 8474 | Specifying an engine (by its unique | ||
| 8475 | .Ar id | ||
| 8476 | string) will cause | ||
| 8477 | .Nm ts | ||
| 8478 | to attempt to obtain a functional reference to the specified engine, | ||
| 8479 | thus initialising it if needed. | ||
| 8480 | The engine will then be set as the default | ||
| 8481 | for all available algorithms. | ||
| 8482 | .It Fl in Ar response.tsr | ||
| 8483 | Specifies a previously created time stamp response or time stamp token, if | ||
| 8484 | .Fl token_in | ||
| 8485 | is also specified, | ||
| 8486 | in DER format that will be written to the output file. | ||
| 8487 | This option does not require a request; | ||
| 8488 | it is useful, for example, | ||
| 8489 | when you need to examine the content of a response or token | ||
| 8490 | or you want to extract the time stamp token from a response. | ||
| 8491 | If the input is a token and the output is a time stamp response a default | ||
| 8492 | .Dq granted | ||
| 8493 | status info is added to the token. | ||
| 8494 | .It Fl inkey Ar private.pem | ||
| 8495 | The signer private key of the TSA in PEM format. | ||
| 8496 | Overrides the | ||
| 8497 | .Cm signer_key | ||
| 8498 | config file option. | ||
| 8499 | .It Fl out Ar response.tsr | ||
| 8500 | The response is written to this file. | ||
| 8501 | The format and content of the file depends on other options (see | ||
| 8502 | .Fl text | ||
| 8503 | and | ||
| 8504 | .Fl token_out ) . | ||
| 8505 | The default is stdout. | ||
| 8506 | .It Fl passin Ar password_src | ||
| 8507 | Specifies the password source for the private key of the TSA. | ||
| 8508 | See the | ||
| 8509 | .Sx PASS PHRASE ARGUMENTS | ||
| 8510 | section above. | ||
| 8511 | .It Fl policy Ar object_id | ||
| 8512 | The default policy to use for the response unless the client | ||
| 8513 | explicitly requires a particular TSA policy. | ||
| 8514 | The OID can be specified either in dotted notation or with its name. | ||
| 8515 | Overrides the | ||
| 8516 | .Cm default_policy | ||
| 8517 | config file option. | ||
| 8518 | .It Fl queryfile Ar request.tsq | ||
| 8519 | The name of the file containing a DER-encoded time stamp request. | ||
| 8520 | .It Fl section Ar tsa_section | ||
| 8521 | The name of the config file section containing the settings for the | ||
| 8522 | response generation. | ||
| 8523 | If not specified the default TSA section is used; see | ||
| 8524 | .Sx TS CONFIGURATION FILE OPTIONS | ||
| 8525 | for details. | ||
| 8526 | .It Fl signer Ar tsa_cert.pem | ||
| 8527 | The signer certificate of the TSA in PEM format. | ||
| 8528 | The TSA signing certificate must have exactly one extended key usage | ||
| 8529 | assigned to it: timeStamping. | ||
| 8530 | The extended key usage must also be critical, | ||
| 8531 | otherwise the certificate is going to be refused. | ||
| 8532 | Overrides the | ||
| 8533 | .Cm signer_cert | ||
| 8534 | variable of the config file. | ||
| 8535 | .It Fl text | ||
| 8536 | If this option is specified the output is human-readable text format | ||
| 8537 | instead of DER. | ||
| 8538 | .It Fl token_in | ||
| 8539 | This flag can be used together with the | ||
| 8540 | .Fl in | ||
| 8541 | option and indicates that the input is a DER encoded time stamp token | ||
| 8542 | (ContentInfo) instead of a time stamp response (TimeStampResp). | ||
| 8543 | .It Fl token_out | ||
| 8544 | The output is a time stamp token (ContentInfo) instead of time stamp | ||
| 8545 | response (TimeStampResp). | ||
| 8546 | .El | ||
| 8547 | .Pp | ||
| 8548 | The | ||
| 8549 | .Fl verify | ||
| 8550 | command is for verifying if a time stamp response or time stamp token | ||
| 8551 | is valid and matches a particular time stamp request or data file. | ||
| 8552 | The | ||
| 8553 | .Fl verify | ||
| 8554 | command does not use the configuration file. | ||
| 8555 | .Bl -tag -width Ds | ||
| 8556 | .It Fl CAfile Ar trusted_certs.pem | ||
| 8557 | The name of the file containing a set of trusted self-signed CA | ||
| 8558 | certificates in PEM format. | ||
| 8559 | See the similar option of | ||
| 8560 | .Nm verify | ||
| 8561 | for additional details. | ||
| 8562 | Either this option or | ||
| 8563 | .Fl CApath | ||
| 8564 | must be specified. | ||
| 8565 | .It Fl CApath Ar trusted_cert_path | ||
| 8566 | The name of the directory containing the trused CA certificates of the | ||
| 8567 | client. | ||
| 8568 | See the similar option of | ||
| 8569 | .Nm verify | ||
| 8570 | for additional details. | ||
| 8571 | Either this option or | ||
| 8572 | .Fl CAfile | ||
| 8573 | must be specified. | ||
| 8574 | .It Fl data Ar file_to_hash | ||
| 8575 | The response or token must be verified against | ||
| 8576 | .Ar file_to_hash . | ||
| 8577 | The file is hashed with the message digest algorithm specified in the token. | ||
| 8578 | The | ||
| 8579 | .Fl digest | ||
| 8580 | and | ||
| 8581 | .Fl queryfile | ||
| 8582 | options must not be specified with this one. | ||
| 8583 | .It Fl digest Ar digest_bytes | ||
| 8584 | The response or token must be verified against the message digest specified | ||
| 8585 | with this option. | ||
| 8586 | The number of bytes must match the message digest algorithm | ||
| 8587 | specified in the token. | ||
| 8588 | The | ||
| 8589 | .Fl data | ||
| 8590 | and | ||
| 8591 | .Fl queryfile | ||
| 8592 | options must not be specified with this one. | ||
| 8593 | .It Fl in Ar response.tsr | ||
| 8594 | The time stamp response that needs to be verified, in DER format. | ||
| 8595 | This option in mandatory. | ||
| 8596 | .It Fl queryfile Ar request.tsq | ||
| 8597 | The original time stamp request, in DER format. | ||
| 8598 | The | ||
| 8599 | .Fl data | ||
| 8600 | and | ||
| 8601 | .Fl digest | ||
| 8602 | options must not be specified with this one. | ||
| 8603 | .It Fl token_in | ||
| 8604 | This flag can be used together with the | ||
| 8605 | .Fl in | ||
| 8606 | option and indicates that the input is a DER-encoded time stamp token | ||
| 8607 | (ContentInfo) instead of a time stamp response (TimeStampResp). | ||
| 8608 | .It Fl untrusted Ar cert_file.pem | ||
| 8609 | Set of additional untrusted certificates in PEM format which may be | ||
| 8610 | needed when building the certificate chain for the TSA's signing | ||
| 8611 | certificate. | ||
| 8612 | This file must contain the TSA signing certificate and | ||
| 8613 | all intermediate CA certificates unless the response includes them. | ||
| 8614 | .El | ||
| 8615 | .Sh TS CONFIGURATION FILE OPTIONS | ||
| 8616 | The | ||
| 8617 | .Fl query | ||
| 8618 | and | ||
| 8619 | .Fl reply | ||
| 8620 | options make use of a configuration file defined by the | ||
| 8621 | .Ev OPENSSL_CONF | ||
| 8622 | environment variable. | ||
| 8623 | The | ||
| 8624 | .Fl query | ||
| 8625 | option uses only the symbolic OID names section | ||
| 8626 | and it can work without it. | ||
| 8627 | However, the | ||
| 8628 | .Fl reply | ||
| 8629 | option needs the config file for its operation. | ||
| 8630 | .Pp | ||
| 8631 | When there is a command line switch equivalent of a variable the | ||
| 8632 | switch always overrides the settings in the config file. | ||
| 8633 | .Bl -tag -width Ds | ||
| 8634 | .It Cm tsa Ar section , Cm default_tsa | ||
| 8635 | This is the main section and it specifies the name of another section | ||
| 8636 | that contains all the options for the | ||
| 8637 | .Fl reply | ||
| 8638 | option. | ||
| 8639 | This default section can be overriden with the | ||
| 8640 | .Fl section | ||
| 8641 | command line switch. | ||
| 8642 | .It Cm oid_file | ||
| 8643 | See | ||
| 8644 | .Nm ca | ||
| 8645 | for a description. | ||
| 8646 | .It Cm oid_section | ||
| 8647 | See | ||
| 8648 | .Nm ca | ||
| 8649 | for a description. | ||
| 8650 | .It Cm RANDFILE | ||
| 8651 | See | ||
| 8652 | .Nm ca | ||
| 8653 | for a description. | ||
| 8654 | .It Cm serial | ||
| 8655 | The name of the file containing the hexadecimal serial number of the | ||
| 8656 | last time stamp response created. | ||
| 8657 | This number is incremented by 1 for each response. | ||
| 8658 | If the file does not exist at the time of response | ||
| 8659 | generation a new file is created with serial number 1. | ||
| 8660 | This parameter is mandatory. | ||
| 8661 | .It Cm crypto_device | ||
| 8662 | Specifies the | ||
| 8663 | .Nm OpenSSL | ||
| 8664 | engine that will be set as the default for | ||
| 8665 | all available algorithms. | ||
| 8666 | .It Cm signer_cert | ||
| 8667 | TSA signing certificate, in PEM format. | ||
| 8668 | The same as the | ||
| 8669 | .Fl signer | ||
| 8670 | command line option. | ||
| 8671 | .It Cm certs | ||
| 8672 | A file containing a set of PEM-encoded certificates that need to be | ||
| 8673 | included in the response. | ||
| 8674 | The same as the | ||
| 8675 | .Fl chain | ||
| 8676 | command line option. | ||
| 8677 | .It Cm signer_key | ||
| 8678 | The private key of the TSA, in PEM format. | ||
| 8679 | The same as the | ||
| 8680 | .Fl inkey | ||
| 8681 | command line option. | ||
| 8682 | .It Cm default_policy | ||
| 8683 | The default policy to use when the request does not mandate any policy. | ||
| 8684 | The same as the | ||
| 8685 | .Fl policy | ||
| 8686 | command line option. | ||
| 8687 | .It Cm other_policies | ||
| 8688 | Comma separated list of policies that are also acceptable by the TSA | ||
| 8689 | and used only if the request explicitly specifies one of them. | ||
| 8690 | .It Cm digests | ||
| 8691 | The list of message digest algorithms that the TSA accepts. | ||
| 8692 | At least one algorithm must be specified. | ||
| 8693 | This parameter is mandatory. | ||
| 8694 | .It Cm accuracy | ||
| 8695 | The accuracy of the time source of the TSA in seconds, milliseconds | ||
| 8696 | and microseconds. | ||
| 8697 | For example, secs:1, millisecs:500, microsecs:100. | ||
| 8698 | If any of the components is missing, | ||
| 8699 | zero is assumed for that field. | ||
| 8700 | .It Cm clock_precision_digits | ||
| 8701 | Specifies the maximum number of digits, which represent the fraction of | ||
| 8702 | seconds, that need to be included in the time field. | ||
| 8703 | The trailing zeroes must be removed from the time, | ||
| 8704 | so there might actually be fewer digits, | ||
| 8705 | or no fraction of seconds at all. | ||
| 8706 | The maximum value is 6; | ||
| 8707 | the default is 0. | ||
| 8708 | .It Cm ordering | ||
| 8709 | If this option is yes, | ||
| 8710 | the responses generated by this TSA can always be ordered, | ||
| 8711 | even if the time difference between two responses is less | ||
| 8712 | than the sum of their accuracies. | ||
| 8713 | The default is no. | ||
| 8714 | .It Cm tsa_name | ||
| 8715 | Set this option to yes if the subject name of the TSA must be included in | ||
| 8716 | the TSA name field of the response. | ||
| 8717 | The default is no. | ||
| 8718 | .It Cm ess_cert_id_chain | ||
| 8719 | The SignedData objects created by the TSA always contain the | ||
| 8720 | certificate identifier of the signing certificate in a signed | ||
| 8721 | attribute (see RFC 2634, Enhanced Security Services). | ||
| 8722 | If this option is set to yes and either the | ||
| 8723 | .Cm certs | ||
| 8724 | variable or the | ||
| 8725 | .Fl chain | ||
| 8726 | option is specified then the certificate identifiers of the chain will also | ||
| 8727 | be included in the SigningCertificate signed attribute. | ||
| 8728 | If this variable is set to no, | ||
| 8729 | only the signing certificate identifier is included. | ||
| 8730 | The default is no. | ||
| 8731 | .El | ||
| 8732 | .Sh TS ENVIRONMENT VARIABLES | ||
| 8733 | .Ev OPENSSL_CONF | ||
| 8734 | contains the path of the configuration file and can be | ||
| 8735 | overriden by the | ||
| 8736 | .Fl config | ||
| 8737 | command line option. | ||
| 8738 | .Sh TS EXAMPLES | ||
| 8739 | All the examples below presume that | ||
| 8740 | .Ev OPENSSL_CONF | ||
| 8741 | is set to a proper configuration file, | ||
| 8742 | e.g. the example configuration file | ||
| 8743 | .Pa openssl/apps/openssl.cnf | ||
| 8744 | will do. | ||
| 8745 | .Pp | ||
| 8746 | To create a time stamp request for design1.txt with SHA-1 | ||
| 8747 | without nonce and policy and no certificate is required in the response: | ||
| 8748 | .Bd -literal -offset indent | ||
| 8749 | $ openssl ts -query -data design1.txt -no_nonce \e | ||
| 8750 | -out design1.tsq | ||
| 8751 | .Ed | ||
| 8752 | .Pp | ||
| 8753 | To create a similar time stamp request but specifying the message imprint | ||
| 8754 | explicitly: | ||
| 8755 | .Bd -literal -offset indent | ||
| 8756 | $ openssl ts -query \e | ||
| 8757 | -digest b7e5d3f93198b38379852f2c04e78d73abdd0f4b \e | ||
| 8758 | -no_nonce -out design1.tsq | ||
| 8759 | .Ed | ||
| 8760 | .Pp | ||
| 8761 | To print the content of the previous request in human readable format: | ||
| 8762 | .Bd -literal -offset indent | ||
| 8763 | $ openssl ts -query -in design1.tsq -text | ||
| 8764 | .Ed | ||
| 8765 | .Pp | ||
| 8766 | To create a time stamp request which includes the MD5 digest | ||
| 8767 | of design2.txt, requests the signer certificate and nonce, | ||
| 8768 | specifies a policy ID | ||
| 8769 | (assuming the tsa_policy1 name is defined in the | ||
| 8770 | OID section of the config file): | ||
| 8771 | .Bd -literal -offset indent | ||
| 8772 | $ openssl ts -query -data design2.txt -md5 \e | ||
| 8773 | -policy tsa_policy1 -cert -out design2.tsq | ||
| 8774 | .Ed | ||
| 8775 | .Pp | ||
| 8776 | Before generating a response, | ||
| 8777 | a signing certificate must be created for the TSA that contains the | ||
| 8778 | .Cm timeStamping | ||
| 8779 | critical extended key usage extension | ||
| 8780 | without any other key usage extensions. | ||
| 8781 | You can add the | ||
| 8782 | .Dq extendedKeyUsage = critical,timeStamping | ||
| 8783 | line to the user certificate section | ||
| 8784 | of the config file to generate a proper certificate. | ||
| 8785 | See the | ||
| 8786 | .Nm req , | ||
| 8787 | .Nm ca , | ||
| 8788 | and | ||
| 8789 | .Nm x509 | ||
| 8790 | commands for instructions. | ||
| 8791 | The examples below assume that cacert.pem contains the certificate of the CA, | ||
| 8792 | tsacert.pem is the signing certificate issued by cacert.pem and | ||
| 8793 | tsakey.pem is the private key of the TSA. | ||
| 8794 | .Pp | ||
| 8795 | To create a time stamp response for a request: | ||
| 8796 | .Bd -literal -offset indent | ||
| 8797 | $ openssl ts -reply -queryfile design1.tsq -inkey tsakey.pem \e | ||
| 8798 | -signer tsacert.pem -out design1.tsr | ||
| 8799 | .Ed | ||
| 8800 | .Pp | ||
| 8801 | If you want to use the settings in the config file you could just write: | ||
| 8802 | .Bd -literal -offset indent | ||
| 8803 | $ openssl ts -reply -queryfile design1.tsq -out design1.tsr | ||
| 8804 | .Ed | ||
| 8805 | .Pp | ||
| 8806 | To print a time stamp reply to stdout in human readable format: | ||
| 8807 | .Bd -literal -offset indent | ||
| 8808 | $ openssl ts -reply -in design1.tsr -text | ||
| 8809 | .Ed | ||
| 8810 | .Pp | ||
| 8811 | To create a time stamp token instead of time stamp response: | ||
| 8812 | .Bd -literal -offset indent | ||
| 8813 | $ openssl ts -reply -queryfile design1.tsq \e | ||
| 8814 | -out design1_token.der -token_out | ||
| 8815 | .Ed | ||
| 8816 | .Pp | ||
| 8817 | To print a time stamp token to stdout in human readable format: | ||
| 8818 | .Bd -literal -offset indent | ||
| 8819 | $ openssl ts -reply -in design1_token.der -token_in \e | ||
| 8820 | -text -token_out | ||
| 8821 | .Ed | ||
| 8822 | .Pp | ||
| 8823 | To extract the time stamp token from a response: | ||
| 8824 | .Bd -literal -offset indent | ||
| 8825 | $ openssl ts -reply -in design1.tsr -out design1_token.der \e | ||
| 8826 | -token_out | ||
| 8827 | .Ed | ||
| 8828 | .Pp | ||
| 8829 | To add | ||
| 8830 | .Dq granted | ||
| 8831 | status info to a time stamp token thereby creating a valid response: | ||
| 8832 | .Bd -literal -offset indent | ||
| 8833 | $ openssl ts -reply -in design1_token.der \e | ||
| 8834 | -token_in -out design1.tsr | ||
| 8835 | .Ed | ||
| 8836 | .Pp | ||
| 8837 | To verify a time stamp reply against a request: | ||
| 8838 | .Bd -literal -offset indent | ||
| 8839 | $ openssl ts -verify -queryfile design1.tsq -in design1.tsr \e | ||
| 8840 | -CAfile cacert.pem -untrusted tsacert.pem | ||
| 8841 | .Ed | ||
| 8842 | .Pp | ||
| 8843 | To verify a time stamp reply that includes the certificate chain: | ||
| 8844 | .Bd -literal -offset indent | ||
| 8845 | $ openssl ts -verify -queryfile design2.tsq -in design2.tsr \e | ||
| 8846 | -CAfile cacert.pem | ||
| 8847 | .Ed | ||
| 8848 | .Pp | ||
| 8849 | To verify a time stamp token against the original data file: | ||
| 8850 | .Bd -literal -offset indent | ||
| 8851 | $ openssl ts -verify -data design2.txt -in design2.tsr \e | ||
| 8852 | -CAfile cacert.pem | ||
| 8853 | .Ed | ||
| 8854 | .Pp | ||
| 8855 | To verify a time stamp token against a message imprint: | ||
| 8856 | .Bd -literal -offset indent | ||
| 8857 | $ openssl ts -verify \e | ||
| 8858 | -digest b7e5d3f93198b38379852f2c04e78d73abdd0f4b \e | ||
| 8859 | -in design2.tsr -CAfile cacert.pem | ||
| 8860 | .Ed | ||
| 8861 | .Sh TS BUGS | ||
| 8862 | .Pp | ||
| 8863 | No support for time stamps over SMTP, though it is quite easy | ||
| 8864 | to implement an automatic email-based TSA with | ||
| 8865 | .Xr procmail | ||
| 8866 | and | ||
| 8867 | .Xr perl 1 . | ||
| 8868 | HTTP server support is provided in the form of | ||
| 8869 | a separate | ||
| 8870 | .Xr httpd 8 | ||
| 8871 | module. | ||
| 8872 | Pure TCP/IP is not supported. | ||
| 8873 | .Pp | ||
| 8874 | The file containing the last serial number of the TSA is not | ||
| 8875 | locked when being read or written. | ||
| 8876 | This is a problem if more than one instance of | ||
| 8877 | .Nm OpenSSL | ||
| 8878 | is trying to create a time stamp | ||
| 8879 | response at the same time. | ||
| 8880 | This is not an issue when using the | ||
| 8881 | .Xr httpd 8 | ||
| 8882 | server module, which does proper locking. | ||
| 8883 | .Pp | ||
| 8884 | Look for the FIXME word in the source files. | ||
| 8885 | .Pp | ||
| 8886 | The source code should really be reviewed by somebody else, too. | ||
| 8887 | .Pp | ||
| 8888 | More testing is needed. | ||
| 8889 | .Sh TS AUTHORS | ||
| 8890 | .An Zoltan Glozik Aq zglozik@opentsa.org , | ||
| 8891 | OpenTSA project | ||
| 8892 | .Pq Pa http://www.opentsa.org . | ||
| 8893 | .\" | ||
| 8269 | .\" SPKAC | 8894 | .\" SPKAC |
| 8270 | .\" | 8895 | .\" |
| 8271 | .Sh SPKAC | 8896 | .Sh SPKAC |
