Chapter 13. Managing subsystem certificates


You can request, create, and install certificates in Certificate System and on different clients by using the HTML end-entity forms. You can also manage certificates and configure servers to use them.

13.1. Required subsystem certificates

Each subsystem has a defined set of certificates which must be issued to the subsystem instance for it to perform its operations. There are certain details of the certificate contents that are set during the Certificate Manager configuration, with different considerations for constraints, settings, and attributes depending on the types of certificates; planning the formats of certificates is covered in the Red Hat Certificate System Planning, Installation, and Deployment Guide.

13.1.1. Certificate Manager certificates

When a Certificate Manager is installed, the keys and requests for the CA signing certificate, SSL server certificate, and OCSP signing certificate are generated. The certificates are created before the configuration can be completed.

The CA certificate request is either submitted as a self-signing request to the CA, which then issues the certificate and finishes creating the self-signed root CA, or is submitted to a third-party public CA or another Certificate System CA. When the external CA returns the certificate, the certificate is installed, and installation of the subordinate CA is completed.

13.1.1.1. CA signing key pair and certificate

Every Certificate Manager has a CA signing certificate with a public key corresponding to the private key the Certificate Manager uses to sign the certificates and CRLs it issues. This certificate is created and installed when the Certificate Manager is installed. The default nickname for the certificate is caSigningCert cert-instance_ID CA, where instance_ID identifies the Certificate Manager instance. The default validity period for the certificate is five years.

The subject name of the CA signing certificate reflects the name of the CA that was set during installation. All certificates signed or issued by the Certificate Manager include this name to identify the issuer of the certificate.

The Certificate Manager’s status as a root or subordinate CA is determined by whether its CA signing certificate is self-signed or is signed by another CA, which affects the subject name on the certificates.

  • If the Certificate Manager is a root CA, its CA signing certificate is self-signed, meaning the subject name and issuer name of the certificate are the same.
  • If the Certificate Manager is a subordinate CA, its CA signing certificate is signed by another CA, usually the one that is a level above in the CA hierarchy (which may or may not be a root CA). The root CA’s signing certificate must be imported into individual clients and servers before the Certificate Manager can be used to issue certificates to them.
Note

The CA name cannot be changed or all previously-issued certificates are invalidated. Similarly, reissuing a CA signing certificate with a new key pair invalidates all certificates that were signed by the old key pair.

13.1.1.2. OCSP signing key pair and certificate

The subject name of the OCSP signing certificate is in the form cn=OCSP cert-instance_ID CA, and it contains extensions, such as OCSPSigning and OCSPNoCheck, required for signing OCSP responses.

The default nickname for the OCSP signing certificate is ocspSigningCert cert-instance_ID CA, where instance_ID CA identifies the Certificate Manager instance.

The OCSP private key, corresponding to the OCSP signing certificate’s public key, is used by the Certificate Manager to sign the OCSP responses to the OCSP-compliant clients when queried about certificate revocation status.

13.1.1.3. Subsystem certificate

Every member of the security domain is issued a server certificate to use for communications among other domain members, which is separate from the server SSL certificate. This certificate is signed by the security domain CA; for the security domain CA itself, its subsystem certificate is signed by itself.

The default nickname for the certificate is subsystemCert cert-instance_ID.

13.1.1.4. SSL server key pair and certificate

Every Certificate Manager has at least one SSL server certificate that was first generated when the Certificate Manager was installed. The default nickname for the certificate is Server-Cert cert-instance_ID, where instance_ID identifies the Certificate Manager instance.

By default, the Certificate Manager uses a single SSL server certificate for authentication. However, additional server certificates can be requested to use for different operations, such as configuring the Certificate Manager to use separate server certificates for authenticating to the end-entity services interface and agent services interface.

If the Certificate Manager is configured for SSL-enabled communication with a publishing directory, it uses its SSL server certificate for client authentication to the publishing directory by default. The Certificate Manager can also be configured to use a different certificate for SSL client authentication.

The CA keeps a secure audit log of all events which occurred on the server. To guarantee that the audit log has not been tampered with, the log file is signed by a special log signing certificate.

The audit log signing certificate is issued when the server is first configured.

Note

While other certificates can use ECC keys, the audit signing certificate must always use an RSA key.

When the Online Certificate Status Manager is first configured, the keys for all required certificates are created, and the certificate requests for the OCSP signing, SSL server, audit log signing, and subsystem certificates are made. These certificate requests are submitted to a CA (either a Certificate System CA or a third-party CA) and must be installed in the Online Certificate Status Manager database to complete the configuration process.

13.1.2.1. OCSP signing key pair and certificate

Every Online Certificate Status Manager has a certificate, the OCSP signing certificate, which has a public key corresponding to the private key the Online Certificate Status Manager uses to sign OCSP responses. The Online Certificate Status Manager’s signature provides persistent proof that the Online Certificate Status Manager has processed the request. This certificate is generated when the Online Certificate Status Manager is configured. The default nickname for the certificate is ocspSigningCert cert-instance_ID, where instance_ID OSCP is the Online Certificate Status Manager instance name.

13.1.2.2. SSL server key pair and certificate

Every Online Certificate Status Manager has at least one SSL server certificate which was generated when the Online Certificate Status Manager was configured. The default nickname for the certificate is Server-Cert cert-instance_ID, where instance_ID identifies the Online Certificate Status Manager instance name.

The Online Certificate Status Manager uses its server certificate for server-side authentication for the Online Certificate Status Manager agent services page.

The Online Certificate Status Manager uses a single server certificate for authentication purposes. Additional server certificates can be installed and used for different purposes.

13.1.2.3. Subsystem certificate

Every member of the security domain is issued a server certificate to use for communications among other domain members, which is separate from the server SSL certificate. This certificate is signed by the security domain CA.

The default nickname for the certificate is subsystemCert cert-instance_ID.

The OCSP keeps a secure audit log of all events which occurred on the server. To guarantee that the audit log has not been tampered with, the log file is signed by a special log signing certificate.

The audit log signing certificate is issued when the server is first configured.

Note

While other certificates can use ECC keys, the audit signing certificate must always use an RSA key.

Depending on the CA which signed the Online Certificate Status Manager’s SSL server certificate, it may be necessary to get the certificate and issuing CA recognized by the Certificate Manager.

  • If the Online Certificate Status Manager’s server certificate is signed by the CA that is publishing CRLs, then nothing needs to be done.
  • If the Online Certificate Status Manager’s server certificate is signed by the same root CA that signed the subordinate Certificate Manager’s certificates, then the root CA must be marked as a trusted CA in the subordinate Certificate Manager’s certificate database.
  • If the Online Certificate Status Manager’s SSL server certificate is signed by a different root CA, then the root CA certificate must be imported into the subordinate Certificate Manager’s certificate database and marked as a trusted CA.

If the Online Certificate Status Manager’s server certificate is signed by a CA within the selected security domain, the certificate chain is imported and marked when the Online Certificate Status Manager is configured. No other configuration is required. However, if the server certificate is signed by an external CA, the certificate chain has to be imported for the configuration to be completed.

Note

Not every CA within the security domain is automatically trusted by the OCSP Manager when it is configured. Every CA in the certificate chain of the CA configured in the CA panel is, however, trusted automatically by the OCSP Manager. Other CAs within the security domain but not in the certificate chain must be added manually.

13.1.3. Key Recovery Authority certificates

The KRA uses the following key pairs and certificates:

13.1.3.1. Transport key pair and certificate

Every KRA has a transport certificate. The public key of the key pair that is used to generate the transport certificate is used by the client software to encrypt an end entity’s private encryption key before it is sent to the KRA for archival; only those clients capable of generating dual-key pairs use the transport certificate.

13.1.3.2. Storage key pair

Every KRA has a storage key pair. The KRA uses the public component of this key pair to encrypt (or wrap) private encryption keys when archiving the keys. It uses the private component to decrypt (or unwrap) the archived key during recovery. For more information on how this key pair is used, see Chapter 4, Setting up key archival and recovery.

Keys encrypted with the storage key can be retrieved only by authorized key recovery agents.

13.1.3.3. SSL server certificate

Every Certificate System KRA has at least one SSL server certificate. When you configure the KRA, the first SSL server certificate is generated. The default nickname for the certificate is Server-Cert cert-instance_ID, where instance_id identifies the KRA instance installed.

The CA that received the certificate request issues the KRA’s SSL server certificate. This CA can be a Certificate System CA or a third-party CA.

The KRA uses its SSL server certificate for server-side authentication to the KRA agent services interface. By default, the Key Recovery Authority uses a single SSL server certificate for authentication. However, additional SSL server certificates can be requested and installed for the KRA.

13.1.3.4. Subsystem certificate

Every member of the security domain is issued a server certificate to use for communications among other domain members, which is separate from the server SSL certificate. This certificate is signed by the security domain CA.

The default nickname for the certificate is subsystemCert cert-instance_ID.

The KRA keeps a secure audit log of all events which occurred on the server. To guarantee that the audit log has not been tampered with, the log file is signed by a special log signing certificate.

The audit log signing certificate is issued when the server is first configured.

Note

While other certificates can use ECC keys, the audit signing certificate must always use an RSA key.

13.1.4. TKS certificates

The TKS has three certificates. The SSL server and subsystem certificates are used for standard operations. An additional signing certificate is used to protect audit logs.

13.1.4.1. SSL server certificate

Every Certificate System TKS has at least one SSL server certificate. The first SSL server certificate is generated when the TKS is configured. The default nickname for the certificate is Server-Cert cert-instance_ID.

13.1.4.2. Subsystem certificate

Every member of the security domain is issued a server certificate to use for communications among other domain members, which is separate from the server SSL certificate. This certificate is signed by the security domain CA.

The default nickname for the certificate is subsystemCert cert-instance_ID.

The TKS keeps a secure audit log of all events which occurred on the server. To guarantee that the audit log has not been tampered with, the log file is signed by a special log signing certificate.

The audit log signing certificate is issued when the server is first configured.

Note

While other certificates can use ECC keys, the audit signing certificate must always use an RSA key.

13.1.5. TPS Certificates

The TPS only uses three certificates: a server certificate, subsystem certificate, and audit log signing certificate.

13.1.5.1. SSL server certificate

Every Certificate System TPS has at least one SSL server certificate. The first SSL server certificate is generated when the TPS is configured. The default nickname for the certificate is Server-Cert cert-instance_ID.

13.1.5.2. Subsystem certificate

Every member of the security domain is issued a server certificate to use for communications among other domain members, which is separate from the server SSL certificate. This certificate is signed by the security domain CA.

The default nickname for the certificate is subsystemCert cert-instance_ID.

The TPS keeps a secure audit log of all events which occurred on the server. To guarantee that the audit log has not been tampered with, the log file is signed by a special log signing certificate.

The audit log signing certificate is issued when the server is first configured.

13.1.6. About subsystem certificate key types

When you create a new instance, you can specify the key type and key size in the configuration file passed to the pkispawn utility.

Example 13.1. Key type-related configuration parameters for a CA

The following are key type-related parameters including example values. You can set these parameters in the configuration file which you pass to pkispawn when creating a new CA.

pki_ocsp_signing_key_algorithm=SHA256withRSA
pki_ocsp_signing_key_size=2048
pki_ocsp_signing_key_type=rsa

pki_ca_signing_key_algorithm=SHA256withRSA
pki_ca_signing_key_size=2048
pki_ca_signing_key_type=rsa

pki_sslserver_key_algorithm=SHA256withRSA
pki_sslserver_key_size=2048
pki_sslserver_key_type=rsa

pki_subsystem_key_algorithm=SHA256withRSA
pki_subsystem_key_size=2048
pki_subsystem_key_type=rsa

pki_admin_keysize=2048
pki_admin_key_size=2048
pki_admin_key_type=rsa

pki_audit_signing_key_algorithm=SHA256withRSA
pki_audit_signing_key_size=2048
pki_audit_signing_key_type=rsa
Note

The values in the example are for a CA. Other subsystems require different parameters.

For further details, see:

By default, keys and certificates are stored in locally-managed databases, key4.db and cert9.db, respectively, in the /var/lib/pki/ instance_name/alias directory. However, Red Hat Certificate System also supports hardware security modules (HSM), external devices which can store keys and certificates in a centralized place on the network. Using an HSM can make some functions, like cloning, easier because the keys and certificates for the instance are readily accessible.

When an HSM is used to store certificates, then the HSM name is prepended to the certificate nickname, and the full name is used in the subsystem configuration, such as the server.xml file. For example:

serverCert="nethsm:Server-Cert cert-instance_ID
Note

A single HSM can be used to store certificates and keys for mulitple subsystem instances, which may be installed on multiple hosts. When an HSM is used, any certificate nickname for a subsystem must be unique for every subsystem instance managed on the HSM.

Certificate System supports two types of HSM, nCipher netHSM and Chrysalis LunaSA.

13.2. Renewing subsystem certificates

There are two methods of renewing a certificate. Regenerating the certificate takes its original key and its original profile and request, and recreates an identical key with a new validity period and expiration date. Re-keying a certificate resubmits the initial certificate request to the original profile, but generates a new key pair. Administrator certificates can be renewed by being re-keyed.

Subsystem certificates can be renewed directly in the end user enrollment forms, using the serial number of the original certificate.

  1. Renew the certificates in the CA’s end-entities forms, as described in Section 5.4, “Renewing certificates”. This requires the serial number of the subsystem certificate being renewed.
  2. Import the certificate into the subsystem’s database, as described in Section 13.4.1, “Installing certificates in the Certificate System database”. For example:

    certutil -A -n "ServerCert cert-example" -t u,u,u -d /var/lib/pki/ instance_name/alias -a -i /tmp/example.cert

13.2.2. Renewing certificates using certutil

certutil can be used to generate a certificate request using an existing key pair in the certificate database. The new certificate request can then be submitted through the regular profile pages for the CA to issue a renewed certificate.

Note

Encryption and signing certificates are created in a single step. However, the renewal process only renews one certificate at a time.

To renew both certificates in a certificate pair, each one has to be renewed individually.

  1. Get the password for the token database.

    cat /var/lib/pki/ instance_name/conf/password.conf
    
    internal=263163888660
  2. Open the certificate database directory of the instance whose certificate is being renewed.

    cd /var/lib/pki/ instance_name/alias
  3. List the key and nickname for the certificate being renewed. In order to renew a certificate, the key pairs used to generate and the subject name given to the new certificate must be the same as the one in the old certificate.

    # certutil -K -d .
    
    certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key and Certificate Services"
    Enter Password or Pin for "NSS Certificate DB":
    < 0> rsa      69481646e38a6154dc105960aa24ccf61309d37d   caSigningCert cert-pki-tomcat CA
  4. Copy the alias directory as a backup, then delete the original certificate from the certificate database. For example:

    certutil -D -n "ServerCert cert-example"  -d .
  5. Run the certutil command with the options set to the values in the existing certificate.

    certutil -d . -R -n "NSS Certificate DB:cert-pki-tomcat CA" -s "cn=CA Authority,o=Example Domain" -a -o example.req2.txt

    The difference between generating a new certificate and key pair and renewing the certificate is the value of the -n option. To generate an entirely new request and key pair, then -k sets the key type and is used with -g, which sets the bit length. For a renewal request, the -n option uses the certificate nickname to access the existing key pair stored in the security database.

    For further details about the parameters, see the certutil(1) man page.

  6. Submit the certificate request and then retrieve it and install it, as described in Section 5.3, “Requesting and receiving certificates”.

Certificate System does not automatically renew its server certificates online while the PKI server is running. In general, administrators should renew the system certificates before they expire. However, if a system certificate expires, Certificate System will fail to start.

To renew system certificates after expiration, you can set up a temporary server certificate:

  1. If the system certificate is expired:

    1. Create a temporary certificate:

      # pki-server cert-create sslserver --temp
    2. Import the temporary certificate into Certificate System’s Network Security Services (NSS) database:

      # pki-server cert-import sslserver
    3. Start Certificate System:

      # pki-server start instance_name
  2. Display the certificates and note the ID of the expired system certificate:

    # pki-server cert-find
  3. Create the new permanent certificate:

    # pki-server cert-create certificate_ID
  4. Stop Certificate System:

    # pki-server stop instance_name
  5. Import the new certificate to replace the expired certificate:

    # pki-server cert-import certificate_ID
  6. Start Certificate System:

    # pki-server start instance_name

13.3. Changing the names of subsystem certificates

One alternative to renewing certificates is replacing them with new certificates, meaning that a new certificate is generated with new keys. Generally, a new certificate can be added to the database and the old one deleted, a simple one-to-one swap. This is possible because the individual subsystem servers identify certificates based on their nickname; as long as the certificate nickname remains the same, the server can find the required certificate even if other factors -like the subject name, serial number, or key -are different.

However, in some situations, the new certificate may have a new certificate nickname, as well. In that case, the certificate nickname needs to be updated in all of the required settings in the subsystem’s CS.cfg configuration file.

Important

Always restart a subsystem after editing the CS.cfg file.

These tables list all of the configuration parameters for each of the subsystem’s certificates:

Table 13.1. CA certificate nickname parameters

CA Signing Certificate

  • ca.cert.signing.nickname
  • ca.signing.cacertnickname
  • ca.signing.certnickname
  • ca.signing.nickname
  • cloning.signing.nickname

OCSP Signing Certificate

  • ca.ocsp_signing.cacertnickname
  • ca.ocsp_signing.certnickname
  • ca.cert.ocsp_signing.nickname
  • ca.ocsp_signing.nickname
  • cloning.ocsp_signing.nickname

Subsystem Certificate

  • ca.cert.subsystem.nickname
  • ca.subsystem.nickname
  • cloning.subsystem.nickname
  • pkiremove.cert.subsystem.nickname

Server Certificate

  • ca.sslserver.nickname
  • ca.cert.sslserver.nickname

Audit Signing Certificate

  • ca.audit_signing.nickname
  • ca.cert.audit_signing.nickname
  • cloning.audit_signing.nickname
Table 13.2. KRA certificate nickname parameters

Transport Certificate

  • cloning.transport.nickname
  • kra.cert.transport.nickname
  • kra.transport.nickname
  • tks.kra_transport_cert_nickname

    Note that this parameter is in the TKS configuration file. This needs to be changed in the TKS configuration if the KRA transport certificate nickname changes, even if the TKS certificates all stay the same.

Storage Certificate

  • cloning.storage.nickname
  • kra.storage.nickname
  • kra.cert.storage.nickname

Server Certificate

  • kra.cert.sslserver.nickname
  • kra.sslserver.nickname

Subsystem Certificate

  • cloning.subsystem.nickname
  • kra.cert.subsystem.nickname
  • kra.subsystem.nickname
  • pkiremove.cert.subsystem.nickname

Audit Log Signing Certificate

  • cloning.audit_signing.nickname
  • kra.cert.audit_signing.nickname
  • kra.audit_signing.nickname
Table 13.3. OCSP certificate nickname parameters

OCSP Signing Certificate

  • cloning.signing.nickname
  • ocsp.signing.certnickname
  • ocsp.signing.cacertnickname
  • ocsp.signing.nickname

Server Certificate

  • ocsp.cert.sslserver.nickname
  • ocsp.sslserver.nickname

Subsystem Certificate

  • cloning.subsystem.nickname
  • ocsp.subsystem.nickname
  • ocsp.cert.subsystem.nickname
  • pkiremove.cert.subsystem

Audit Log Signing Certificate

  • cloning.audit_signing.nickname
  • ocsp.audit_signing.nickname
  • ocsp.cert.audit_signing.nickname
Table 13.4. TKS certificate nickname parameters

KRA Transport Certificate[a]

  • tks.kra_transport_cert_nickname

Server Certificate

  • tks.cert.sslserver.nickname
  • tks.sslserver.nickname

Subsystem Certificate

  • cloning.subsystem.nickname
  • tks.cert.subsystem.nickname
  • tks.subsystem.nickname
  • pkiremove.cert.subsystem.nickname

Audit Log Signing Certificate

  • cloning.audit_signing.nickname
  • tks.audit_signing.nickname
  • tks.cert.audit_signing.nickname
[a] This needs to be changed in the TKS configuration if the KRA transport certificate nickname changes, even if the TKS certificates all stay the same.
Table 13.5. TPS nickname parameters in CS.cfg

Server Certificate

  • tps.cert.sslserver.nickname

Subsystem Certificate

  • tps.cert.subsystem.nickname
  • selftests.plugin.TPSValidity.nickname
  • selftests.plugin.TPSPresence.nickname
  • pkiremove.cert.subsystem.nickname

Audit Log Signing Certificate

  • tps.cert.audit_signing.nickname

13.4. Managing the certificate database

Each Certificate System instance has a certificate database, which is maintained in its internal token. This database contains certificates belonging to the subsystem installed in the Certificate System instance and various CA certificates the subsystems use for validating the certificates they receive.

Even if an external token is used to generate and store key pairs, Certificate System always maintains its list of trusted and untrusted CA certificates in its internal token.

This section explains how to view the contents of the certificate database, delete unwanted certificates, and change the trust settings of CA certificates installed in the database. For information on adding certificates to the database, see Section 13.4.1, “Installing certificates in the Certificate System database”.

Note

The Certificate System command-line utility certutil can be used to manage the certificate database by editing trust settings and adding and deleting certificates. For details about this tool, see http://www.mozilla.org/projects/security/pki/nss/tools/.

Administrators should periodically check the contents of the certificate database to make sure that it does not include any unwanted CA certificates. For example, if the database includes CA certificates that should not ever be trusted within the PKI setup, delete them.

If a subsystem receives new server certificates, install them in the database for this subsystem. Also install user and agent certificates in the subsystem databases. If an external CA issued the certificates, you must also typically install the corresponding CA certificate or certificate chain.

You can install certificates in the subsystem certificate database using the certutil utility.

13.4.1.1. Installing certificates using certutil

To install subsystem certificates in the Certificate System instance’s security databases using certutil, do the following:

  1. Open the subsystem’s security database directory.

    cd /var/lib/pki/ instance_name/alias
  2. Run the certutil command with the -A to add the certificate and -i pointing to the file containing the certificate issued by the CA.

    certutil -A -n cert-name -t trustargs
       -d . -a -i certificate_file
    Note

    If the Certificate System instance’s certificates and keys are stored on an HSM, then specify the token name using the -h option.

    For example:

    certutil -A -n "ServerCert cert-instance_name" -t u,u,u -d . -a -i /tmp/example.cert

For information about using the certutil command, see http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html.

13.4.1.2. About CA certificate chains

Any client or server software that supports certificates maintains a collection of trusted CA certificates in its certificate database. These CA certificates determine which other certificates the software can validate. In the simplest case, the software can validate only certificates issued by one of the CAs for which it has a certificate. It is also possible for a trusted CA certificate to be part of a chain of CA certificates, each issued by the CA above it in a certificate hierarchy.

The first certificate in the chain is processed in a context-specific manner, which varies according to how it is being imported. For Mozilla Firefox, this handling depends upon the MIME content type used on the object being downloaded. For Red Hat servers, it depends upon the options selected in the server administration interface.

Subsequent certificates are all treated the same. If the certificates contain the SSL-CA bit in the Netscape Certificate Type certificate extension and do not already exist in the local certificate database, they are added as untrusted CAs. They can be used for certificate chain validation as long as there is a trusted CA somewhere in the chain.

13.4.1.3. Viewing database content

You can view the certificates stored in the subsystem certificates database, cert9.db, using the certutil utility.

Note

The certificates listed in the cert9.db database are the subsystem certificates used for subsystem operations. User certificates are stored with the user entries in the LDAP internal database.

To view the certificates in the subsystem database using certutil, open the instance’s certificate database directory, and run the certutil with the -L option. For example:

cd /var/lib/pki/ instance_name/alias

certutil -L -d .

Certificate Authority - Example Domain    CT,c,
subsystemCert cert-instance name          u,u,u
Server-Cert cert-instance_name            u,u,u

To view the keys stored in the subsystem databases using certutil, run the certutil with the -K option. For example:

cd /var/lib/pki/ instance_name/alias

certutil -K -d .

Enter Password or Pin for "NSS Certificate DB":
<0> subsystemCert cert-instance_name
1

<2> Server-Cert cert-instance_name

For information about using the certutil command, see http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html.

13.4.2. Deleting certificates from the database

Removing unwanted certificates reduces the size of the certificate database.

Note

When deleting CA certificates from the certificate database, be careful not to delete the intermediate CA certificates, which help a subsystem chain up to the trusted CA certificate. If in doubt, leave the certificates in the database as untrusted CA certificates; see Section 13.5, “Changing the trust settings of a CA certificate”.

13.4.2.1. Deleting certificates

To delete a certificate from the database using certutil:

  1. Open the instance’s certificate databases directory.

    /var/lib/pki/ instance_name/alias
  2. List the certificates in the database by running the certutil with the -L option. For example:

    certutil -L -d .
    
    Certificate Authority - Example Domain    CT,c,
    subsystemCert cert-instance_name          u,u,u
    Server-Cert cert-instance_name            u,u,u
  3. Delete the certificate by running the certutil with the -D option.

    certutil -D -d . -n certificate_nickname

    For example:

    certutil -D -d . -n "ServerCert cert-instance_name"
  4. List the certificates again to confirm that the certificate was removed.

    certutil -L -d .
    
    Certificate Authority - Example Domain    CT,c,
    subsystemCert cert-instance_name          u,u,u

For information about using the certutil command, see http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html.

Certificate System subsystems use CA certificates stored in their databases to validate credentials received during SSL-enabled communication.

You might need to change the trust settings on a CA stored in the database temporarily or permanently. For example, if a CA is compromised, marking its certificate as untrusted prevents entities with certificates signed by that CA from authenticating to the Certificate System. When you resolve the problem, you can mark the CA as trusted again.

To untrust a CA permanently, consider removing its certificate from the trust database. See Section 13.4.2, “Deleting certificates from the database”.

To change the trust setting of a certificate using certutil, do the following:

  1. Open the instance’s certificate databases directory.

    cd /var/lib/pki/ instance_name/alias
  2. List the certificates in the database by running the certutil with the -L option. For example:

    certutil -L -d .
    
    Certificate Authority - Example Domain    CT,c,
    subsystemCert cert-instance_name          u,u,u
    Server-Cert cert-instance_name            u,u,u
  3. Change the trust settings for the certificate by running the certutil with the -M option.

    certutil -M -n cert_nickname -t trust -d .

    For example:

    certutil -M -n "Certificate Authority - Example Domain" -t TCu,TCu,TCu -d .
  4. List the certificates again to confirm that the certificate trust was changed.

    certutil -L -d .
    
    Certificate Authority - Example Domain    CTu,CTu,CTu
    subsystemCert cert-instance_name          u,u,u
    Server-Cert cert-instance_name            u,u,u

For information about using the certutil command, see http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html.

13.6. Managing tokens used by the subsystems

Certificate System manages two groups of tokens: tokens used by the subsystems to perform PKI tasks and tokens issued through the subsystem. These management tasks refer specifically to tokens that are used by the subsystems.

13.6.1. Detecting tokens

To see if a token can be detected by Certificate System to be installed or configured, use the TokenInfo utility.

TokenInfo /var/lib/pki/ instance_name/alias
Database Path: /var/lib/pki/ instance_name/alias
Found external module 'NSS Internal PKCS #11 Module'

This utility will return all tokens which can be detected by the Certificate System, not only tokens which are installed in the Certificate System.

13.6.1.1. Viewing tokens

To view a list of the tokens currently installed for a Certificate System instance, use the modutil utility.

  1. Open the instance alias directory. For example:

    cd /var/lib/pki/ instance_name/alias
  2. Show the information about the installed PKCS #11 modules installed as well as information on the corresponding tokens using the modutil tool.

    modutil -dbdir . -nocertdb -list

13.6.2. Changing a token’s password

The token, internal or external, that stores the key pairs and certificates for the subsystems is protected (encrypted) by a password. To decrypt the key pairs or to gain access to them, enter the token password. This password is set when the token is first accessed, usually during Certificate System installation.

It is good security practice to change the password that protects the server’s keys and certificates periodically. Changing the password minimizes the risk of someone finding out the password. To change a token’s password, use the certutil command-line utility.

For information about certutil, see http://www.mozilla.org/projects/security/pki/nss/tools/.

The single sign-on password cache stores token passwords in the password.conf file. This file must be manually updated every time the token password is changed. For more information on managing passwords through the password.conf file, see the Red Hat Certificate System Planning, Installation, and Deployment Guide.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top