How to replace an expiring or expired self-signed digital certificate with one that has a new key pair.
The process to replace or update an expiring certificate differs slightly depending on whether the certificate is self-signed, signed by a CA, or is a third-party CERTAUTH.
The following process documents the replacement of an expiring self-signed certificate with a new self-signed certificate with a new public/private key pair.
Commands:
ACF
EXPORT selfsign.cert1 DSN('saved.cert') FORMAT(PKCS12DER) -
PASSWORD(pkcs12 password)
REMOVE CERTDATA(selfsign.cert1) KEYRING(keyring.ring1)
SET PROFILE(USER) DIV(CERTDATA)
DELETE selfsign.cert1
F ACF2,REBUILD(USR),CLASS(P)
F ACF2,OMVS(CERTDATA)
SET PROFILE(USER) DIV(CERTDATA)
INSERT selfsign.cert1 DSN('new.sitecert.cert') PASSWORD(password) or
GENCERT selfsign.cert1 SUBJSDN(....etc.......) EXPIRE(mmddyy)
CHKCERT selfsign.cert1
F ACF2,REBUILD(USR),CLASS(P)
F ACF2,OMVS(CERTDATA)
CONNECT CERTDATA(selfsign.cert1) KEYRING(keyring.ring1)