diff options
-rw-r--r-- | ipalib/install/certmonger.py | 3 | ||||
-rw-r--r-- | ipaserver/install/certs.py | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/ipalib/install/certmonger.py b/ipalib/install/certmonger.py index 6f0948af6..3ea900b18 100644 --- a/ipalib/install/certmonger.py +++ b/ipalib/install/certmonger.py @@ -312,9 +312,10 @@ def request_and_wait_for_cert( state = wait_for_request(reqId, timeout=60) ca_error = get_request_value(reqId, 'ca-error') if state != 'MONITORING' or ca_error: - raise RuntimeError("Certificate issuance failed") + raise RuntimeError("Certificate issuance failed ({})".format(state)) return reqId + def request_cert( nssdb, nickname, subject, principal, passwd_fname=None, dns=None, ca='IPA', profile=None, pre_command=None, post_command=None): diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py index ab2379b1e..45602baa6 100644 --- a/ipaserver/install/certs.py +++ b/ipaserver/install/certs.py @@ -647,13 +647,11 @@ class CertDB(object): def request_service_cert(self, nickname, principal, host, pwdconf=False): if pwdconf: self.create_password_conf() - reqid = certmonger.request_cert(nssdb=self.secdir, - nickname=nickname, - principal=principal, - subject=host, - passwd_fname=self.passwd_fname) - # Now wait for the cert to appear. Check three times then abort - certmonger.wait_for_request(reqid, timeout=60) + certmonger.request_and_wait_for_cert(nssdb=self.secdir, + nickname=nickname, + principal=principal, + subject=host, + passwd_fname=self.passwd_fname) class _CrossProcessLock(object): |