summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/httpinstance.py
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-06-25 16:53:24 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-06-27 16:01:52 +0200
commitf5bc155f56a3673a419f921db18e64f8647065ec (patch)
tree633a610c3069a5d8ed308ab3f2b356c2342eff45 /ipaserver/install/httpinstance.py
parent736dd0fcd6d35abbea28481dc544502c132f78f8 (diff)
downloadfreeipa-f5bc155f56a3673a419f921db18e64f8647065ec.tar.gz
freeipa-f5bc155f56a3673a419f921db18e64f8647065ec.tar.xz
freeipa-f5bc155f56a3673a419f921db18e64f8647065ec.zip
Create Firefox configuration extension on CA-less install
Create: * kerberosauth.xpi * krb.js even when --http_pkcs12 option is used. https://fedorahosted.org/freeipa/ticket/3747
Diffstat (limited to 'ipaserver/install/httpinstance.py')
-rw-r--r--ipaserver/install/httpinstance.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
index 375016262..14fa9cc6f 100644
--- a/ipaserver/install/httpinstance.py
+++ b/ipaserver/install/httpinstance.py
@@ -313,15 +313,19 @@ class HTTPInstance(service.Service):
pwd = pwdfile.read()
# Setup configure.jar
- tmpdir = tempfile.mkdtemp(prefix="tmp-")
- target_fname = '/usr/share/ipa/html/configure.jar'
- shutil.copy("/usr/share/ipa/html/preferences.html", tmpdir)
- db.run_signtool(["-k", "Signing-Cert",
- "-Z", target_fname,
- "-e", ".html", "-p", pwd,
- tmpdir])
- shutil.rmtree(tmpdir)
- os.chmod(target_fname, 0644)
+ if db.has_nickname('Signing-Cert'):
+ tmpdir = tempfile.mkdtemp(prefix="tmp-")
+ target_fname = '/usr/share/ipa/html/configure.jar'
+ shutil.copy("/usr/share/ipa/html/preferences.html", tmpdir)
+ db.run_signtool(["-k", "Signing-Cert",
+ "-Z", target_fname,
+ "-e", ".html", "-p", pwd,
+ tmpdir])
+ shutil.rmtree(tmpdir)
+ os.chmod(target_fname, 0644)
+ else:
+ root_logger.warning('Object-signing certificate was not found; '
+ 'therefore, configure.jar was not created.')
self.setup_firefox_extension(self.realm, self.domain, force=True)