mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
service: rename import_ca_certs_* to export_*
The import_ca_certs_{file,nssdb} methods were actually exporting CA certificates from LDAP to different formats. The new names should better reflect what these methods are actually doing. Related: https://pagure.io/freeipa/issue/3757 Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
92d91ed58b
commit
0c388d1e8f
@ -225,7 +225,7 @@ class CustodiaInstance(SimpleServiceInstance):
|
||||
|
||||
# Add CA certificates
|
||||
self.suffix = ipautil.realm_to_suffix(self.realm)
|
||||
self.import_ca_certs_nssdb(tmpdb, True)
|
||||
self.export_ca_certs_nssdb(tmpdb, True)
|
||||
|
||||
# Now that we gathered all certs, re-export
|
||||
ipautil.run([paths.PKCS12EXPORT,
|
||||
|
@ -938,7 +938,7 @@ class DsInstance(service.Service):
|
||||
conn.simple_bind(bind_dn=ipaldap.DIRMAN_DN,
|
||||
bind_password=self.dm_password)
|
||||
|
||||
self.import_ca_certs_nssdb(dsdb, self.ca_is_configured, conn)
|
||||
self.export_ca_certs_nssdb(dsdb, self.ca_is_configured, conn)
|
||||
|
||||
conn.unbind()
|
||||
|
||||
|
@ -419,7 +419,7 @@ class HTTPInstance(service.Service):
|
||||
paths.IPA_CA_CRT, False)
|
||||
|
||||
def __publish_ca_cert(self):
|
||||
self.import_ca_certs_file(paths.CA_CRT, self.ca_is_configured)
|
||||
self.export_ca_certs_file(paths.CA_CRT, self.ca_is_configured)
|
||||
|
||||
def is_kdcproxy_configured(self):
|
||||
"""Check if KDC proxy has already been configured in the past"""
|
||||
|
@ -379,9 +379,9 @@ class Service(object):
|
||||
logger.critical("Could not add certificate to service %s entry: "
|
||||
"%s", self.principal, str(e))
|
||||
|
||||
def import_ca_certs_file(self, cafile, ca_is_configured, conn=None):
|
||||
def export_ca_certs_file(self, cafile, ca_is_configured, conn=None):
|
||||
"""
|
||||
Import the CA certificates stored in LDAP into a file
|
||||
Export the CA certificates stored in LDAP into a file
|
||||
|
||||
:param cafile: the file to write the CA certificates to
|
||||
:param ca_is_configured: whether IPA is CA-less or not
|
||||
@ -401,9 +401,9 @@ class Service(object):
|
||||
for cert, _unused, _unused, _unused in ca_certs:
|
||||
fd.write(cert.public_bytes(x509.Encoding.PEM))
|
||||
|
||||
def import_ca_certs_nssdb(self, db, ca_is_configured, conn=None):
|
||||
def export_ca_certs_nssdb(self, db, ca_is_configured, conn=None):
|
||||
"""
|
||||
Import the CA certificates stored in LDAP into an NSS database
|
||||
Export the CA certificates stored in LDAP into an NSS database
|
||||
|
||||
:param db: the target NSS database
|
||||
:param ca_is_configured: whether IPA is CA-less or not
|
||||
|
Loading…
Reference in New Issue
Block a user