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 5.3.2.1, “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
”.
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.
- Get the password for the token database.
cat /var/lib/pki/instance_name/conf/password.conf internal=263163888660
- Open the certificate database directory of the instance whose certificate is being renewed.
cd /var/lib/pki/instance_name/alias
- 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
- 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 .
- 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. - 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:
- If the system certificate is expired:
- Create a temporary certificate:
# pki-server cert-create sslserver --temp
- Import the temporary certificate into Certificate System's Network Security Services (NSS) database:
# pki-server cert-import sslserver
- Start Certificate System:
# systemctl start pki-tomcatd-nuxwdog@instance_name.service
- Display the certificates and note the ID of the expired system certificate:
# pki-server cert-find
- Create the new permanent certificate:
# pki-server cert-create certificate_ID
- Stop Certificate System:
# systemctl stop pki-tomcatd-nuxwdog@instance_name.service
- Import the new certificate to replace the expired certificate:
# pki-server cert-import certificate_ID
- Start Certificate System:
# systemctl start pki-tomcatd-nuxwdog@instance_name.service