summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/certs.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2012-08-23 12:38:45 -0400
committerRob Crittenden <rcritten@redhat.com>2012-09-17 18:43:59 -0400
commit4f76c143d2f2036af02677469c542f563a10158d (patch)
tree8ed4716135c53486710950b453f17bb71f36c658 /ipaserver/install/certs.py
parent3dd31a875650c7fe7c67ca6b47f2058c1181dafb (diff)
downloadfreeipa-4f76c143d2f2036af02677469c542f563a10158d.tar.gz
freeipa-4f76c143d2f2036af02677469c542f563a10158d.tar.xz
freeipa-4f76c143d2f2036af02677469c542f563a10158d.zip
Use Dogtag 10 only when it is available
Put the changes from Ade's dogtag 10 patch into namespaced constants in dogtag.py, which are then referenced in the code. Make ipaserver.install.CAInstance use the service name specified in the configuration. Uninstallation, where config is removed before CA uninstall, also uses the (previously) configured value. This and Ade's patch address https://fedorahosted.org/freeipa/ticket/2846
Diffstat (limited to 'ipaserver/install/certs.py')
-rw-r--r--ipaserver/install/certs.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py
index f0f0f1dfd..0094d0b89 100644
--- a/ipaserver/install/certs.py
+++ b/ipaserver/install/certs.py
@@ -660,8 +660,13 @@ class CertDB(object):
f = open(self.passwd_fname, "r")
password = f.readline()
f.close()
- http_status, http_reason_phrase, http_headers, http_body = \
- dogtag.https_request(self.host_name, api.env.ca_ee_install_port, "/ca/ee/ca/profileSubmitSSLClient", self.secdir, password, "ipaCert", **params)
+ result = dogtag.https_request(
+ self.host_name,
+ api.env.ca_ee_install_port or
+ dogtag.install_constants.EE_SECURE_PORT,
+ "/ca/ee/ca/profileSubmitSSLClient",
+ self.secdir, password, "ipaCert", **params)
+ http_status, http_reason_phrase, http_headers, http_body = result
if http_status != 200:
raise CertificateOperationError(
@@ -743,8 +748,13 @@ class CertDB(object):
f = open(self.passwd_fname, "r")
password = f.readline()
f.close()
- http_status, http_reason_phrase, http_headers, http_body = \
- dogtag.https_request(self.host_name, api.env.ca_ee_install_port, "/ca/ee/ca/profileSubmitSSLClient", self.secdir, password, "ipaCert", **params)
+ result = dogtag.https_request(
+ self.host_name,
+ api.env.ca_ee_install_port or
+ dogtag.install_constants.EE_SECURE_PORT,
+ "/ca/ee/ca/profileSubmitSSLClient",
+ self.secdir, password, "ipaCert", **params)
+ http_status, http_reason_phrase, http_headers, http_body = result
if http_status != 200:
raise RuntimeError("Unable to submit cert request")