Code signing
Microsoft SignTool

Configure KMES Series 3

23min

This section covers general configurations on the KMES Series 3 to enable SignTool to integrate with the KMES by using the Futurex CNG library. Then, it shows you how to configure TLS communication between the System/Host API port on the KMES and the Futurex CNG library.

Configure general KMES settings for KMES to SignTool communication

Perform the following tasks to configure the KMES Series 3 for communication with SignTool:

  1. Create a SignTool role with the required permissions.
  2. Create a SignTool identity with the correct assigned roles.
  3. Enable Host API commands.
  4. Create a signing approval group.
  5. Export the code signing certificate.
  6. Export the CA certificate that issued the code signing certificate.
  7. Apply an issuance policy to the code signing certificate

The following sections show you how to complete these tasks.

Create a role for Signtool with the required permissions

1

Log in to the KMES Series 3 with the default Admin identities.

2

Go to Identity Management > Roles and select [ Add ].

3

On the Info tab, set the Type to Application, set a name for the role such as SignTool, and set the Logins Required to 1.

4

On the Permissions tab, enable the following permissions:

Permission

Subpermission



Certificate Authority

Export, Upload



Keys

Add


5

On the Advanced tab, configure Allowed Ports to Host API only.

6

Select [ OK ] to finish creating the role.

Create a new identity and assign it to the SignTool role

1

Go to Identity Management > Identities, right-click anywhere in the window, and select Add > Client Application.

2

On the Info tab, set the Storage type to Application and set a name for the identity, such as SignTool.

3

On the Assigned Roles tab, select the SignTool role you just created.

4

On the Authentication tab, remove the default API Key mechanism, add the Password authentication mechanism, and configure a password.

5

Select [ OK ] to finish creating the identity.

A later section shows how to configure the SignTool identity in the fxpkcs11.cfg file to enable the Futurex PKCS #11 library to connect to the KMES Series 3.

Enable the Host API commands required for Microsoft Signtool operations

Because the Futurex CNG library connects to the Host API port on the KMES, you must define which Host API commands to enable for the FXCNG library. To set the enabled commands, complete the following steps:

1

Log in to the KMES Series 3 application interface with the default Admin identities.

2

Go to Administration > Configuration > Host API Options and enable the following commands:

Command

Description



ECHO

Communication Test/Retrieve Version



RAFA

Filter Issuance Policy



RAGA

Retrieve Issuance Policy



RAGO

Retrieve Request (Hash Signing)



RAUO

Upload Request (Hash Signing)



RAGZ

Retrieve Request (Authenticode)



RAUZ

Upload Request (Authenticode)



RAGJ

Retrieve Request (Jar Signing)



RAUJ

Upload Request (Jar Signing)



RKCP

Get Command Permissions



RKLN

Lookup Objects



RKLO

Login User



RKRK

Retrieve Generated Keys


3

Select [ Save ] to finish.

Create a signing approval group

1

Go to PKI > Signing Workflow and select [ Add Approval Group ] at the bottom of the page.

2

Set a name for the Approval Group, such as SignTool and select [ OK ] to save.

3

Right-click the SignTool approval group and select [ Permission ].

4

Give the SignTool role the Use permission and select [ OK ] to save.

Create a code signing certificate

This section describes three different methods that you can use to issue a code signing certificate.

Use a CA on the KMES

1

Go to PKI > Certificate Authorities and select [ Add CA ] at the bottom of the page.

2

In the Certificate Authority window, enter a Name for the certificate container, such as SignTool. Set the owner field to the SignTool role and select [ OK ].

3

Right-click the SignTool certificate container and select Add Certificate > New Certificate.

4

On the Subject DN tab, set a Common Name for the certificate, such as Root.

5

On the Basic Info tab, leave the fields set to the default values.

6

On the V3 Extensions tab, select the Certificate Authority profile and select [ OK ].

The Root CA certificate now displays under the SignTool certificate container.

7

Right-click the Root CA certificate you created and select Add Certificate > New Certificate.

8

On the Subject DN tab, set a Common Name for the certificate, such as Code Signing.

9

On the V3 Extensions tab, select the Code Signing Certificate profile and select [ OK ].

The code signing certificate now displays under the Root CA certificate in the SignTool certificate container.

Use an External CA

For this method, you must import the external CA certificates into an empty certificate container on the KMES. Then, generate a Certificate Signing Request (CSR), which the external CA uses to issue a code signing certificate. Finally, import the code signing certificate into the certificate container on the KMES that contains the external CA certificate.

1

Go to PKI > Certificate Authorities and select [ Add CA] at the bottom of the page.

2

In the Certificate Authority window, enter a Name for the certificate container, such as SignTool. Set the owner field to the SignTool role and select [ OK ].

3

Right-click the SignTool certificate container and select Import > Certificates.

4

In the Import Certificates window, select [ Add ], and select the external CA certificates for issuing the code signing certificate.

The CA certificates display in the Verified section of the Import Certificates window.

5

Select [ OK ] to save.

The external CA certificates should now display in tree form under the SignTool certificate container.

6

To create a placeholder code signing certificate, from which you can generate a CSR, right-click the lowest level CA certificate in the tree and select Add Certificate > Pending.

7

On the Subject DN tab of the Create X.509 Certificate window, set a Common Name for the certificate, such as Code Signing.

8

On the V3 Extensions tab, select the code signing certificate profile.

9

Select [ OK ].

The code signing placeholder certificate now displays under the external CA certificates.

10

Right-click the placeholder code signing certificate and select Export > Signing Request.

11

On the Subject DN tab of the Create PKCS #10 Request window, leave all fields set to the default values.0

12

On the V3 Extensions tab, select the code signing certificate profile.

13

On the PKCS #10 Info tab, specify a save location for the CSR and select [ OK ].

A message box states that the certificate signing request was successfully written to the location you specified.

14

Send the CSR file to an external certificate authority (CA).

Using the CSR, the external CA issues a code signing certificate.

15

After the external CA issues the code signing certificate, copy it to the storage medium you configured on the KMES.

16

In the Certificate Authorities menu on the KMES, right-click the placeholder code signing certificate and select Replace > With Signed Certificate.

17

In the Import Certificates window, select [ Add ], and select the externally signed code signing certificate in the file browser.

The code signing certificate displays under the CA certificates in the Verified section of the Import Certificates window.

18

Select [ OK ] to save.

Import an existing code signing certificate as a PKCS #12 file

To perform the steps in this section, you must go to Administration > Configuration > Options and enable the Allow import of certificates using passwords option.

1

Go to PKI > Certificate Authorities and select [ Add CA ] at the bottom of the page.

2

In the Certificate Authority window, enter a Name for the certificate container, such as imported. Set the owner field to the SignTool role and select [ OK ].

3

Right-click the Imported certificate container, and select Import > PKCS12.

4

In the Import PKCS12 window, select the PKCS #12 file to import and select [ Next ].

5

Input the file password and select [ Next ].

6

Select [ Finish ] to initiate the import.

Export the code signing certificate

Perform the following steps to export the code signing certificate no matter which of the preceding methods you used to create it:

1

Go to PKI > Certificate Authorities.

2

Right-click the code signing certificate you configured in the previous section, then select Export > Certificate(s).

3

Change the encoding to PEM and select [ Browse ]. Specify the location where you want to save the file.

4

Select [ OK ] to initiate the export.

Export the CA certificate that issued the code signing certificate

Perform the following steps to export the CA certificate no matter which method you used to create it:

1

Go to PKI > Certificate Authorities.

2

Right-click the CA certificate that issued the code signing certificate and select Export > Certificate(s).

3

Change the encoding to PEM and select [ Browse ]. Specify the location where you want to save the file.

4

Select [ OK ] to initiate the export.

5

Repeat steps 1-4 for any additional CA certificates that are in the certificate tree (if applicable).

Apply an issuance policy to the code signing certificate

1

Go to PKI > Certificate Authorities.

2

Right-click the code signing certificate and select Issuance Policy > Add.

3

On the Basic Info tab, set Approvals to 0 to allow anonymous signing, and select any hashes that you want to allow.

4

On the X.509 tab, set the Default approval group to SignTool.

5

On the Object Signing tab, select the Allow object signing checkbox.

6

Select [ OK ] to apply the issuance policy to the SignTool code signing certificate.

Configure TLS communication

Perform the following tasks to configure TLS communication between the KMES Series 3 and the FXCL CNG library:

  1. Create a Certificate Authority.
  2. Generate a CSR for the System/Host API connection pair.
  3. Sign the System/Host API CSR.
  4. Export the Root CA and the signed System/Host API TLS certificate.
  5. Load the exported certificates into the System/Host API connection pair.
  6. Generate a signed client certificate for SignTool and FXCNG.
  7. Allow export of certificates using passwords.
  8. Export the signed SignTool certificate as a PKCS #12 file.

The following sections describe how to perform these tasks.

Create a Certificate Authority (CA)

1

Log in to the KMES Series 3 application interface with the default Admin identities.

2

Go to PKI > Certificate Authorities and select [ Add CA ] at the bottom of the page.

3

In the Certificate Authority window, enter a Name for the certificate container, leave all other fields set to the default values, and select [ OK ].

The new Certificate Container now displays in the Certificate Authorities menu.

4

Right-click the certificate container and select Add Certificate > New Certificate.

5

On the Subject DN tab, set a Common Name for the certificate, such as System TLS CA Root.

6

On the Basic Info tab, leave fields set to the default values.

7

In the V3 Extensions tab, select the Certificate Authority profile and select [ OK ].

The root CA certificate now displays under the previously created certificate container.

Generate a CSR for the System/Host API connection pair

1

Go to Administration > Configuration > Network Options.

2

In the Network Options window, select the TLS/SSL Settings tab.

3

Under the System/Host API connection pair, uncheck the Use Futurex certificates checkbox and select [ Edit ] next to PKI keys in the User Certificates section.

4

In the Application Public Keys window, select [ Generate ].

5

When warned that SSL will not be functional until new certificates are imported, select [ Yes ] to continue.

6

In the PKI Parameters window, leave the default settings and select [ OK ].

The Application Public Keys window now shows that a PKI Key Pair is loaded.

7

Select [ Request ].

8

On the Subject DN tab, you can leave the default System/Host API value set in the Common Name field, or you can change it to a different value.

9

On the V3 Extensions tab, select the TLS Server Certificate profile.

10

On the PKCS #10 Info tab, select a save location for the CSR and select [ OK ].

The main Network Options window now shows Loaded next to PKI keys.

Sign the System/Host API CSR

1

Go to PKI > Certificate Authorities.

2

Right-click the root CA certificate you created and select Add Certificate > From Request.

3

In the file browser, select the CSR that you generated for the System/Host API connection pair.

4

After it loads, don't modify any settings for the certificate. Select [ OK ].

The signed System/Host API certificate now displays under the root CA certificate on the Certificate Authorities page.

Export the root CA and signed System/Host API TLS certificates

1

Right-click the root CA certificate and select Export > Certificate(s).

2

Change the encoding to PEM and select [ Browse ]. Specify a save location and name for the export file.

3

When prompted that the file was successfully written to the location that was selected, select [ OK ].

4

Right-click the signed System/Host API certificate and select Export > Certificate(s).

5

Change the encoding to PEM and select [ Browse ]. Specify a save location and name for the export file.

6

When prompted that the file was successfully written to the location that was selected, select [ OK ].

Load the exported TLS certificates into the System/Host API connection pair

1

Go to Administration > Configuration > Network Options.

2

In the Network Options window, go to the TLS/SSL Settings tab.

3

Select [ Edit ] next to Certificates in the User Certificates section.

4

Right-click the System/Host API SSL CA X.509 certificate container and select [ Import ].

5

Select [ Add ] at the bottom of the Import Certificates window.

6

In the file browser, select both the root CA certificate and the signed System/Host API certificate, and select [ Open ].

7

Select [ OK ] to save the changes.

In the Network Options window, the System/Host API connection pair shows Signed loaded next to Certificates in the User Certificates section

8

Select [ OK ] to save and exit the Network Options window.

Generate a signed client TLS certificate for SignTool and FXCNG

1

Go to PKI > Certificate Authorities.

2

Right-click the root CA certificate and select Add Certificate > New Certificate.

3

On the Subject DN tab, set a Common Name for the certificate, such as SignTool.

4

Leave all fields on the Basic Info tab set to the default values.

5

On the V3 Extensions tab, select the TLS Client Certificate profile and select [ OK ].

The signed SignTool certificate now displays the root CA certificate.

Allow export of certificates by using passwords

1

Go to Administration > Configuration > Options.

2

Select the checkbox next to the second menu option, Allow export of certificates using passwords.

3

Select [ Save ].

Export the signed SignTool client TLS certificate as a PKCS #12 file

1

Go to PKI > Certificate Authorities.

2

Right-click the signed SignTool Client certificate and select Export > PKCS12.

3

Select [ Set Password ], enter a password for the PKCS #12 file, and select [ Save ].

4

In the Export Certificate window, select Export Selected Certificate under Export Options and select [ Next ].

5

Specify a name for the PKCS #12 export file and select [ Open ].

A message box states that the PKCS #12 certificate export was successful.

6

Move the SignTool certificate and the System TLS CA Root certificate to the computer that uses the Microsoft SignTool application.

A later section shows you how to configure them in the Futurex CNG configuration file and use them for TLS communication with the KMES Series 3.