The OpenPGP Signer signs arbitrary data and produces an OpenPGP detached signature in binary or ASCII armored form, or a cleartext signature. For more information on the OpenPGP format, refer to RFC 4880.
After setting up the OpenPGP Signer, see the following guides for signing:
To download a sample configuration file for this worker, see Sample Worker Configurations.
Prerequisite: Configure a Crypto Worker
As with all Signers, the OpenPGP Signer requires a Crypto Worker (software keystore or PKCS#11) to be available before setup. If you already have one configured, skip to Step 1.
To set up a Crypto Worker using the sample software keystore:
-
Select the Admin Web Workers tab, and click Add.
-
Click From Template, select keystore-crypto.properties in the list, and click Next.
-
In the configuration text view, update
WORKERGENID1.KEYSTOREPATHto match your SignServer installation. For example:WORKERGENID1.KEYSTOREPATH=/home/username/signserver/res/test/dss10/dss10_keystore.p12. -
Click Apply.
Note the Crypto Worker name (for example, CryptoTokenP12) to use in Step 1.
OpenPGP Signer Configuration Properties
The following lists the relevant configuration properties when configuring OpenPGP Signer:
|
Property |
Description |
|---|---|
|
|
Required. Whether to produce a detached signature ( |
|
|
(Optional) OpenPGP Hash Algorithm to use with the signature. Possible values are numeric or textual OpenPGP Hash Algorithms, for example Default: |
|
|
(Optional) Response format: Default: Clear-text signatures ( |
For all available properties, refer to OpenPGP Signer.
Step 1 - Add OpenPGP Signer
-
Select the Admin Web Workers tab, and click Add to add a new Worker.
-
Select From Template.
-
Choose openpgpsigner.properties in the list, and click Next.
-
Update the configuration properties as needed:
-
NAME: Set a descriptive Worker name.
-
CRYPTOTOKEN: set this to match your Crypto Token:
-
SignServer Enterprise: use the name of the Crypto Token configured during Installation.
-
Appliance: the token was created automatically and is named HSMCryptoToken10.
-
SignServer Cloud: a CryptoTokenP12 is provided with sample keys and certificates. Skip the key generation step below and verify the Worker is in an Active state.
-
-
AUTHTYPE: If using a live system, configure this so that the Worker cannot be accessed without authentication.
-
DEFAULTKEY: Set to an existing key alias, or do this in a later step.
-
DETACHEDSIGNATURE, DIGEST_ALGORITHM, RESPONSE_FORMAT: Configure as needed. For descriptions of all OpenPGP Signer-specific properties, see OpenPGP Signer.
-
-
Click Apply. The Worker appears in the All Workers list.
-
To generate a new key pair, click the Status Summary tab and then Renew Key.
-
Select a Key Algorithm, such as
RSA, and a Key Specification such as2048, and click Generate. -
Select the Worker, and confirm the Worker status is Active and without errors.
Step 2 - Add User ID and Certification
This step associates a User ID with the OpenPGP public key, using the Generate CSR option:
-
On the Admin Web Workers tab, select the OpenPGP Worker.
-
Click Generate CSR, and specify:
-
Signature Algorithm: For example,
SHA256withRSAorSHA256withECDSA. The OpenPGP Signer also accepts an OpenPGP Hash Algorithm directly. -
DN: Enter the User ID, for example:
Signer001 (Code Signing) <signer001@example.com>
-
-
Click Generate, and then Download.
-
Open the downloaded file using any text editor and copy the content.
-
Select the Worker, and click the Configuration tab.
-
Click Edit next to the
PGPPUBLICKEYproperty. -
Paste the public key content into the Value field, and click Submit.
-
Click Status Summary and confirm that PGP Key ID, PGP Public key, and User ID are all listed.
Step 3 - Generate and Store Revocation Certificate
A revocation certificate lets authorized personnel invalidate the public key if it is ever compromised. Generate one and store it securely.
The GENERATE_REVOCATION_CERTIFICATE property must be temporarily set to true to generate the certificate, then set back to false afterward so that normal signing requests do not produce revocation certificates.
-
On the Configuration tab, click Edit next to the
GENERATE_REVOCATION_CERTIFICATEproperty. -
Set the value to
true, and click Submit. -
Click Generate CSR and specify:
-
Signature Algorithm: For example,
SHA256withRSAorSHA256withECDSA. The OpenPGP Signer also accepts an OpenPGP Hash Algorithm directly. -
DN: Any value as this field is not used when generating a revocation certificate.
-
-
Click Generate, and then Download.
-
Store the downloaded revocation certificate in a secure location accessible to authorized personnel.
-
Return to the Configuration tab, and click Edit next to the
GENERATE_REVOCATION_CERTIFICATEproperty. -
Set value back to
false, and click Submit.
Step 4 - Test Signing
The following example shows how to sign using the SignServer Client Web, but you can use any SignServer client interface.
-
Click Client Web.
-
Under File Upload, specify the Worker name used, for example, OpenPGPSigner.
-
Select the file you want to sign, for example,
release.zip. -
Click Submit and save the resulting detached signature file, for example,
release.zip.asc.
Step 5 - Verify Signature
Use any OpenPGP-compatible tool to verify the signature. The following example uses GnuPG:
If the public key of the Signer is not yet in your GnuPG keyring, import it first:
-
Save the public key (from the
PGPPUBLICKEYproperty) assigner001-pub.asc. -
Import the key:
$ gpg --import signer001-pub.asc
Then verify the signature:
$ gpg --verify release.zip.asc release.zip
Step 6 - (Optional) Distribute the OpenPGP Public Key
The OpenPGP Public Key can be published to online key servers or distributed to clients by other means.