The PlainSigner can sign arbitrary data and simply produces a signature in the format determined by the configured signature algorithm.
Fully qualified class name: org.signserver.module.cmssigner.PlainSigner
Overview
To download a sample configuration file for this Worker, see Sample Worker Configurations.
For information on the interfaces this Worker can be called through, see Supported Interfaces by Worker.
For a guide on signing code with a Plain Signer, see Code Signing with Plain Signatures.
For a guide on signing code with client-side hashing using a Plain Signer, see Code Signing with Client-side Hashing.
Available Properties
The following table lists and describes the available properties for the Plain Signer:
|
Property |
Default |
Description |
|---|---|---|
|
|
None |
Comma-separated list of accepted hash digest algorithms. When a request is consisting of a pre-computed hash, the requested digest algorithm must be among the values specified in this property. The property does not have a default value and must be specified if client-side hashing is set as the default, or if overriding via the request is allowed. |
|
|
|
Property specifying if the request is allowed to override the behavior defined via With this option set to |
|
|
None |
Comma-separated list of accepted properties to override. When a request contains metadata with a property which allows override, the value in the metadata is used instead of the value configured in the Plain Signer. Supported properties: |
|
|
|
Property specifying if the request data should be considered to be a pre-computed (by the requesting client) hash. If this is set to With this option set to true, the input to the signer should be the hash value and the request parameter |
|
|
|
Property specifying if the message digest of the requested document should be put in the log. |
|
|
|
Property specifying the algorithm used to create the message digest (hash) of the request document to put in the log. |
|
|
|
Set to See also general information about this property under Common Worker Configuration. As the signer certificate (if any) will not be provided in the status output or status properties but instead the PEM encoded public key is available in the status output under the "Public key" section. The status output is formatted so it may be required to trim white spaces from within the PEM block before some tools will be able to parse it. |
|
|
Depends on the signing key |
Property specifying the algorithm used to sign the data. Default value depends on the signing key:
The default value can also depend on if client-side hashing is used. If a signing key is used together with client-side hashing with no set signature algorithm, RSA and ECDSA keys default to NONEwithRSA and NONEwithECDSA respectively. |
Request Parameters
The following metadata properties can be sent by the client with the request:
|
Property |
Description |
|---|---|
|
|
The hash digest algorithm of the pre-computed hash. |
|
|
If this property is set and defined as |
|
|
Provide a valid signature algorithm, which must be compatible with the signing key. |
Worker Log Fields
|
Field |
Description |
|---|---|
|
|
A message digest (hash) for the request document in hex encoding. |
|
|
The name of the message digest (hash) algorithm used for the request digest in the log. |
|
|
The response document (plain signature) in base64 encoding. |
Overriding the Signature Algorithm in the Worker
If you need the flexibility to choose a signature algorithm at request time rather than fixing it in the Worker configuration, you can allow the request metadata to override it.
To enable this:
-
In the Worker, set
ALLOW_PROPERTY_OVERRIDE=SIGNATUREALGORITHM. -
In the request metadata, include the
SIGNATUREALGORITHMproperty with a valid signature algorithm that is compatible with the signing key.
If SIGNATUREALGORITHM is provided in the metadata but ALLOW_PROPERTY_OVERRIDE is not set in the Worker, the signing request is rejected.