summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-server-install
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-10-15 17:25:34 +0000
committerPetr Viktorin <pviktori@redhat.com>2014-03-25 16:54:54 +0100
commit9b3055ca4123062044871a1cc72b4c10cab1eeb5 (patch)
tree905372c3fefce38fc2a2fb12095e4849070d9268 /install/tools/ipa-server-install
parent48539b35d78f8872fc2996e045987bcfa6ab7db7 (diff)
downloadfreeipa-9b3055ca4123062044871a1cc72b4c10cab1eeb5.tar.gz
freeipa-9b3055ca4123062044871a1cc72b4c10cab1eeb5.tar.xz
freeipa-9b3055ca4123062044871a1cc72b4c10cab1eeb5.zip
Upload CA certificate from DS NSS database in CA-less server install.
Before, the file provided in the --root-ca-file option was used directly for the upload. However, it is the same file which is imported to the NSS database, so the second code path is not necessary. Also removed now unused upload_ca_dercert method of dsinstance. Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'install/tools/ipa-server-install')
-rwxr-xr-xinstall/tools/ipa-server-install12
1 files changed, 3 insertions, 9 deletions
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 3069ba8d0..288022812 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -68,7 +68,7 @@ from ipapython import sysrestore
from ipapython.ipautil import *
from ipapython import ipautil
from ipapython import dogtag
-from ipalib import api, errors, util, x509
+from ipalib import api, errors, util
from ipapython.config import IPAOptionParser
from ipalib.x509 import load_certificate_from_file, load_certificate_chain_from_file
from ipalib.util import validate_domain_name
@@ -1120,14 +1120,8 @@ def main():
# This is done within stopped_service context, which restarts CA
ca.enable_client_auth_to_db()
- # Upload the CA cert to the directory
- ds.upload_ca_cert()
- else:
- with open(options.root_ca_file) as f:
- pem_cert = f.read()
-
- # Upload the CA cert to the directory
- ds.upload_ca_dercert(base64.b64decode(x509.strip_header(pem_cert)))
+ # Upload the CA cert to the directory
+ ds.upload_ca_cert()
krb = krbinstance.KrbInstance(fstore)
if options.pkinit_pkcs12: