-| \-\-pin= | Optional |
-If PIN is not provided with this parameter value and (the default) PKCS#11 module is used for signing then the utility program asks for the user to insert PIN code to command line during the program’s execution time. |
-| \-\-profile= | Optional |
-Profile of the signature. Possible values are:
+| Option | Usage | Description |
+|--------------------------------|----------|---------------------------------------------------------|
+| `--pin=` | Optional | PIN code, asked on the command line when omitted |
+| `--profile=` | Optional | Signature profile, see the values below |
+| `--XAdESEN` | Optional | Use XAdES EN profile |
+| `--city=` | Optional | City where the signature is created |
+| `--street=` | Optional | streetAddress of production place in XAdES EN profile |
+| `--state=` | Optional | State or province where the signature is created |
+| `--postalCode=` | Optional | Postal code of the place where the signature is created |
+| `--country=` | Optional | Country of origin, ISO 3166 2-character code (e.g. EE) |
+| `--role=` | Optional | Signer’s role, can occur multiple times |
+| `--sha(224,256,384,512)` | Optional | Hash function for digest values (testing) |
+| `--sigsha(224,256,384,512)` | Optional | Hash function for the signed hash (testing) |
+| `--sigpsssha(224,256,384,512)` | Optional | Same as `--sigsha*` with `--rsapss` (testing) |
+| `--rsapkcs15` | Optional | Change RSA signature padding to PKCS1.5 |
+| `--rsapss` | Optional | Change RSA signature padding to PSS |
+| `--tsurl=` | Optional | Change TS URL |
+| `--userAgent=` | Optional | Application info sent to the TSA or OCSP service |
+| `--dontValidate` | Optional | Don't validate container on signature creation |
+
+If PIN is not provided with `--pin=` and (the default) PKCS#11 module is used for signing then the utility program asks for the user to insert PIN code to command line during the program’s execution time.
+
+`--profile=` possible values are:
- TS or time-stamp - a time-stamp and OCSP confirmation will be added to an XAdES signature as validation data.
- TSA or time-stamp-archive - a time-stamp and OCSP confirmation will be added to an XAdES signature as validation data, followed by an archive time-stamp over the certificate and revocation information.
- TimeStampToken or time-stamp-token - create the \ref RFC3161 "RFC 3161" token signature used by a new ASiC-S container.
- |
-| \-\-XAdESEN | Optional |
-Use XAdES EN profile. |
-| \-\-city= | Optional |
-City where the signature is created. |
-| \-\-street= | Optional |
-streetAddress of production place in XAdES EN profile. |
-| \-\-state= | Optional |
-State or province where the signature is created. |
-| \-\-postalCode= | Optional |
-Postal code of the place where the signature is created. |
-| \-\-country= | Optional |
-Country of origin. ISO 3166-type 2-character country codes are used (e.g. EE) |
-| \-\-role= | Optional |
-Signer’s role(s). The option can occur multiple times. |
-| \-\-sha(224,256,384,512) | Optional |
-Used for testing purposes. Specifies the hash function that is used when calculating digest values. If not specified then SHA-256 is used by default. |
-| \-\-sigsha(224,256,384,512) | Optional |
-Used for testing purposes. Specifies the hash function that is used for calculating the hash that is being signed. If not specified then SHA-256 is used by default. |
-| \-\-sigpsssha(224,256,384,512) | Optional |
-Used for testing purposes. With RSA keys RSA-PSS padding is used. Specifies the hash function that is used for calculating the hash that is being signed. If not specified then SHA-256 is used by default. Same as \-\-sigsha* with \-\-rsapss |
-| \-\-rsapkcs15 | Optional |
-Option to change RSA Signature padding (RSA PKCS1.5). |
-| \-\-rsapss | Optional |
-Option to change RSA Signature padding (RSA PSS). |
-| \-\-tsurl= | Optional |
-Option to change TS URL. |
-| \-\-userAgent= | Optional |
-Additional application information sent to the TSA or OCSP service. |
-| \-\-dontValidate | Optional |
-Don't validate container on signature creation. |
-
+The hash options are used for testing purposes. `--sha*` specifies the hash function that is used when calculating digest values, `--sigsha*` the hash function that is used for calculating the hash that is being signed, and `--sigpsssha*` does the same and uses RSA-PSS padding with RSA keys. If not specified then SHA-256 is used by default.
Options for specifying module used for accessing the signing token - possible alternatives are PKCS#11, CryptoAPI/CNG and PKCS#12 (for testing purposes). When signing module is not specified then PKCS#11 module is used by default.
-
-| \-\-pkcs11[=] | Optional |
-Signing is done via PKCS#11 module - the default module for singing with smart card in Linux and macOS. When signing via PKCS#11 module then the parameter’s value can be used to specify the path and filename of PKCS#11 driver in your file system. For example, "opensc-pkcs11.dll" in Windows environment and "opensc-pkcs11.so" in Linux and OSX.
-If the parameter’s value is left unspecified then PKCS#11 driver’s location is looked up from configuration file (see also chap. \ref parameters). |
-| \-\-cng | Optional |
-Set the parameter to sign via Microsoft CNG API (in Windows environment). If "--pin" parameter’s value is not set then PIN insertion dialog is displayed to the user. Parameter "--cng" may optionally be used along with parameter "--selectFirst" or "--thumbprint". |
-| \-\-selectFirst | Optional |
-Additional parameter that can optionally be used along with parameter "–cng". When the parameter is set then the first certificate in Windows certificate store is chosen for signature creation. If the parameter is not set then certificate selection dialog window is displayed to user. |
-| \-\-thumbprint | Optional |
-Additional parameter that can optionally be used along with parameter "–cng". When the parameter is set then the certificate by thumbprint in Windows certificate store is chosen for signature creation. If the parameter is not set then certificate selection dialog window is displayed to user. |
-| \-\-pkcs12= | Optional |
-Signing is done via PKCS#12 module - can be used for testing purposes. Enables to use a PKCS#12 software token (containing the signing certificate and private key) for signature creation. Note that the created signature is not a valid signature and it is not equal to handwritten signature as the PKCS#12 software token is not considered a secure signature creation device. |
-
+
+| Option | Usage | Description |
+|-----------------|----------|--------------------------------------------------------|
+| `--pkcs11[=]` | Optional | Sign via PKCS#11 module (default on Linux and macOS) |
+| `--cng` | Optional | Sign via Microsoft CNG API (Windows) |
+| `--selectFirst` | Optional | With `--cng`: use the first certificate in the store |
+| `--thumbprint=` | Optional | With `--cng`: hex thumbprint of the certificate to use |
+| `--pkcs12=` | Optional | Sign with a PKCS#12 software token (testing) |
+
+PKCS#11 is the default module for signing with smart card in Linux and macOS. The value of `--pkcs11=` can be used to specify the path and filename of PKCS#11 driver in your file system. For example, "opensc-pkcs11.dll" in Windows environment and "opensc-pkcs11.so" in Linux and OSX. If the parameter’s value is left unspecified then PKCS#11 driver’s location is looked up from configuration file (see also chap. \ref parameters).
+
+With `--cng`, if `--pin` parameter’s value is not set then PIN insertion dialog is displayed to the user. If neither `--selectFirst` nor `--thumbprint` is set then certificate selection dialog window is displayed to user.
+
+`--pkcs12=` enables to use a PKCS#12 software token (containing the signing certificate and private key) for signature creation. Note that the created signature is not a valid signature and it is not equal to handwritten signature as the PKCS#12 software token is not considered a secure signature creation device.
Sample commands for adding signatures:
```
@@ -387,31 +367,28 @@ Input:
demo-container.asice - container to be modified
```
-
## Extending container validity {#Extending}
-Command "extend" adds new validity evidence and saves the result. Without --signature, it calls the high-level digidoc::Container::extendContainerValidity workflow: eligible ASiC-E or ASiC-S signatures are extended in place, or the original container is wrapped in a new timestamped ASiC-S container when necessary.
+Command "extend" adds new validity evidence and saves the result. Without `--signature`, it calls the high-level digidoc::Container::extendContainerValidity workflow: eligible ASiC-E or ASiC-S signatures are extended in place, or the original container is wrapped in a new timestamped ASiC-S container when necessary.
```
> digidoc-tool extend demo-container.asice
```
-When one or more --signature options are specified, only those zero-based signature indexes are extended directly with digidoc::Signature::extendSignatureProfile. In this mode --profile selects the target profile and --dontValidate skips validation after each extension.
+When one or more `--signature` options are specified, only those zero-based signature indexes are extended directly with digidoc::Signature::extendSignatureProfile. In this mode `--profile` selects the target profile and `--dontValidate` skips validation after each extension.
+
+| Option | Usage | Description |
+|------------------|----------|-------------------------------------------------------|
+| `--signature=` | Optional | Zero-based index of a signature to extend, can repeat |
+| `--profile=` | Optional | Target profile for direct per-signature extension |
+| `--dontValidate` | Optional | Don't validate a directly extended signature |
-