From af99032d901d55e56bccdc272cfbf3617de05b53 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Thu, 17 May 2018 18:39:32 +0200 Subject: [PATCH] ipa-server-install: publish complete cert chain in /usr/share/ipa/html/ca.crt When IPA is installed with an externally signed CA, the master installer does not publish the whole cert chain in /usr/share/ipa/html/ca.crt (but /etc/ipa/ca.crt contains the full chain). If a client is installed with a One-Time Password and without the --ca-cert-file option, the client installer downloads the cert chain from http://master.example.com/ipa/config/ca.crt, which is in fact /usr/share/ipa/html/ca.crt. The client installation then fails. Note that when the client is installed by providing admin/password, installation succeeds because the cert chain is read from the LDAP server. https://pagure.io/freeipa/issue/7526 Reviewed-By: Rob Crittenden --- ipaserver/install/httpinstance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py index 3167f92c2..ac3ae0fa4 100644 --- a/ipaserver/install/httpinstance.py +++ b/ipaserver/install/httpinstance.py @@ -432,7 +432,7 @@ class HTTPInstance(service.Service): raise RuntimeError("HTTPD cert was issued by an unknown CA.") # at this time we can assume any CA cert will be valid since this is # only run during installation - x509.write_certificate(ca_certs[0], paths.CA_CRT) + x509.write_certificate_list(certlist, paths.CA_CRT) def is_kdcproxy_configured(self): """Check if KDC proxy has already been configured in the past"""