14.2. Renewing Subsystem Certificates

For details about renewing subsystem certificates, see Section 3.4.1, “About Renewal”.
The process for renewing a subsystem certificate is the same as for renewing a user certificate.
To renew a system certificate submit the request using the corresponding enrollment profile when using the HttpClient utility. For details about the different system certificate profiles, see Section, “Obtaining System and Server Certificates”.

14.2.1. 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 converted to a CMC request to be submitted to the CA. For details, see Section 5.2.1, “Creating a CSR Using certutil.


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
  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 -k "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 -k 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 -k 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.

14.2.2. Renewing Expired Certificate System Server 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:
      # systemctl start pki-tomcatd-nuxwdog@instance_name.service
  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:
    # systemctl stop pki-tomcatd-nuxwdog@instance_name.service
  5. Import the new certificate to replace the expired certificate:
    # pki-server cert-import certificate_ID
  6. Start Certificate System:
    # systemctl start pki-tomcatd-nuxwdog@instance_name.service