summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipaserver/install/krbinstance.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py
index 08d39e243..c74fe40fa 100644
--- a/ipaserver/install/krbinstance.py
+++ b/ipaserver/install/krbinstance.py
@@ -357,10 +357,15 @@ class KrbInstance(service.Service):
subject = str(DN(('cn', self.fqdn), self.subject_base))
krbtgt = "krbtgt/" + self.realm + "@" + self.realm
certpath = (paths.KDC_CERT, paths.KDC_KEY)
+
try:
- reqid = certmonger.request_cert(certpath, subject, krbtgt,
- dns=self.fqdn, storage='FILE',
- profile='KDCs_PKINIT_Certs')
+ certmonger.request_and_wait_for_cert(
+ certpath,
+ subject,
+ krbtgt,
+ dns=self.fqdn,
+ storage='FILE',
+ profile='KDCs_PKINIT_Certs')
except dbus.DBusException as e:
# if the certificate is already tracked, ignore the error
name = e.get_dbus_name()
@@ -368,11 +373,6 @@ class KrbInstance(service.Service):
root_logger.error("Failed to initiate the request: %s", e)
return
- try:
- certmonger.wait_for_request(reqid)
- except RuntimeError as e:
- root_logger.error("Failed to wait for request: %s", e)
-
# Finally copy the cacert in the krb directory so we don't
# have any selinux issues with the file context
shutil.copyfile(paths.IPA_CA_CRT, paths.CACERT_PEM)