def update_cert_config(nickname, cert): """ When renewing a KRA subsystem certificate the configuration file needs to get the new certificate as well. nickname is one of the known nicknames. cert is a DER-encoded certificate. """ # The cert directive to update per nickname directives = { 'auditSigningCert cert-pki-kra': 'kra.audit_signing.cert', 'storageCert cert-pki-kra': 'kra.storage.cert', 'transportCert cert-pki-kra': 'kra.transport.cert', 'subsystemCert cert-pki-kra': 'kra.subsystem.cert', 'Server-Cert cert-pki-ca': 'kra.sslserver.cert'} DogtagInstance.update_cert_cs_cfg( nickname, cert, directives, paths.KRA_CS_CFG_PATH)
def update_cert_config(nickname, cert): """ When renewing a KRA subsystem certificate the configuration file needs to get the new certificate as well. nickname is one of the known nicknames. cert is a DER-encoded certificate. """ # The cert directive to update per nickname directives = { 'auditSigningCert cert-pki-kra': 'kra.audit_signing.cert', 'storageCert cert-pki-kra': 'kra.storage.cert', 'transportCert cert-pki-kra': 'kra.transport.cert', 'subsystemCert cert-pki-kra': 'kra.subsystem.cert', 'Server-Cert cert-pki-ca': 'kra.sslserver.cert'} if nickname in directives: DogtagInstance.update_cert_cs_cfg( directives[nickname], cert, paths.KRA_CS_CFG_PATH)
def update_cert_config(nickname, cert, dogtag_constants=None): """ When renewing a KRA subsystem certificate the configuration file needs to get the new certificate as well. nickname is one of the known nicknames. cert is a DER-encoded certificate. """ if dogtag_constants is None: dogtag_constants = dogtag.configured_constants() # The cert directive to update per nickname directives = { 'auditSigningCert cert-pki-kra': 'kra.audit_signing.cert', 'storageCert cert-pki-kra': 'kra.storage.cert', 'transportCert cert-pki-kra': 'kra.transport.cert', 'subsystemCert cert-pki-kra': 'kra.subsystem.cert', 'Server-Cert cert-pki-ca': 'kra.sslserver.cert' } DogtagInstance.update_cert_cs_cfg( nickname, cert, directives, dogtag.configured_constants().KRA_CS_CFG_PATH, dogtag_constants)