This article explains how to renew digital certificates in ACF2 and provides sample renewal commands for each use case. It also provides more information on the REKEY/ROLLOVER process if a new private key is desired.
The RENEW subcommand allows you to renew a certificate that is signed by an internal Certificate Authority (CA) in a single step. The certificate must exist in the CA ACF2 database and must have a private key. The new EXPIRE date must fall before the EXPIRE date of the signing CERTAUTH certificate. The private key of CERTAUTH certificate signing the renewed certificate must also be in the CA ACF2 database. If SIGNWITH is not specified, the RENEW subcommand finds the original signing certificate, and signs the renewed certificate with the original signing certificate if the original signing certificate has a private key. In this process the original public/private key pair is retained.
The following outlines the process to renew a certificate signed by an internal CA:
Sample ACF2 Commands:
ACF
CHKCERT userid.cert1
RENEW userid.cert1 EXPIRE(12/31/2030)
CHKCERT userid.cert1 CHAIN
Relevant Error Codes and Possible Causes:
ACF0A005 RECORD(S) NOT FOUND
The certificate specified on the RENEW command does not exist in the ACF2 database. Verify the information used to identify the certificate is correct.
ACF68037 This certificate does not have a private key
The certificate specified on the RENEW command does not have a private key and is unable to be renewed.
ACF68073 The SIGNWITH PRIVATE KEY cannot be found. The certificate cannot be renewed using the RENEW command
The signing certificate for the certificate being renewed does not have a private key and cannot be used to renew the certificate. A different signing certificate that contains a private key will need to be specified.
More details on the RENEW command can be found in the CA ACF2 Documentation in section "RENEW Subcommand".
The following process documents the replacement of an expiring user certificate that has been signed by a third-party Certificate Authority (CA) or by a company CERTAUTH that is not maintained locally (a CHKCERT of the CERTAUTH on the keyring does not show a private key). These expiring certificates have to be sent off to the Certificate Authority to be renewed.
The following outlines the process to renew a certificate signed by an external CA:
Sample ACF2 Commands:
CHKCERT userid.cert1
EXPORT userid.cert1 DSN('saved.userid.cert1') FORMAT(PKCS12DER) PASSWORD(pkcs12 password)
GENREQ userid.cert1 DSN('userid.cert1.req')
** Send to Certificate Authority. Certificate Authority will send back a certificate package. **
CHKCERT DSN('renewed.userid.cert1')
SET PROFILE(USER) DIV(CERTDATA)
INSERT userid.cert1 DSN('renewed.userid.cert1') TRUST
CHKCERT userid.cert1 CHAIN
F ACF2,REBUILD(USR),CLASS(P)
F ACF2,OMVS
More details on the GENREQ command can be found in the CA ACF2 Documentation in section "GENREQ Subcommand".
Relevant Error Codes and Possible Causes:
ACF0A026 RECORD ALREADY EXISTS
If a CERTDATA record is being inserted for renewal, the record ID and public keys of the certificates must match and one of the following criteria must be met:
The above renewal processes assume the existing key pair should be maintained. If a new private key is desired, the REKEY/ROLLOVER process can be used to rekey the expiring certificate (a new private key is created) and retire the old private key. This prevents a private key from being overused. Overuse of the private key leaves it more susceptible to being broken and used by an unintended party. This process is used in conjunction with one of the methods outlined above since the rekeyed certificate will be self-signed.
The following outlines the REKEY/ROLLOVER process to obtain a new private key:
Sample ACF2 Commands:
CHKCERT userid.cert1
EXPORT userid.cert1 DSN('saved.userid.cert1') FORMAT(PKCS12DER) PASSWORD(pkcs12 password)
REKEY userid.cert1 WITHLBL(USER1 Cert 2) WITHS(CERT2)
** Choose the appropriate renewal process from above. An example of an internal renewal is provided below. **
RENEW userid.CERT2 SIGNWITH(CERTAUTH LABEL(Test Signing Cert)) EXPIRE(12/30/2030)
ROLLOVER userid.cert1 NEWLABEL(USER1 Cert 2)
** Note the ROLLOVER command will not change the Certificate USAGE on the Keyring when replacing the old certificate
with the new certificate (as specified by the NEWLABEL keyword) in every key ring to which the old certificate is connected.
CHKCERT userid.cert1
CHKCERT userid.CERT2 CHAIN
SET P(USER) DIV(KEYRING)
LIST userid.RING
F ACF2,REBUILD(USR),CLASS(P)
F ACF2,OMVS
Relevant Error Codes and Possible Causes:
ACF68037 This certificate does not have a private key
The certificate specified in the REKEY command does not have a private key and is unable to be rekeyed.
ACF68091 Both certificates in the ROLLOVER command must have private keys
Either the old certificate or the new certificate specified in the REKEY/ROLLOVER command does not have a private key. This error will display which certificate is causing the error.
CAS20E3E Duplicate PKDS label. Key cannot be generated using the PCI Cryptographic Coprocessor
An attempt was made to generate a key pair for a digital certificate using ICSF and the PCI Cryptographic coprocessor. The PKDS label specified already exists within the PKDS. A different PKDS label will need to be specified.
More details on the REKEY and ROLLOVER commands can be found in the CA ACF2 Documentation in the "REKEY Subcommand" and “ROLLOVER Subcommand” sections.