Fix cert_request for KDC cert

ca_kdc_check() expects an API object, not an LDAP connection. Issue was
introduced in commit 8f4abf7bc1.

See: https://pagure.io/freeipa/issue/6739
Fixes: https://pagure.io/freeipa/issue/8686
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Christian Heimes authored and Florence Blanc-Renaud committed 2021-01-31 14:57:59 +01:00
1 parent 0d9f988f5e
commit 2c48897ed1
1 file changed
+1 -1
+1 -1
View File
@@ -875,7 +875,7 @@ class cert_request(Create, BaseCertMethod, VirtualCommand):
"with subject alt name '%s'.") % name)
if not bypass_caacl:
if principal_type == KRBTGT:
ca_kdc_check(ldap, alt_principal.hostname)
ca_kdc_check(self.api, alt_principal.hostname)
else:
caacl_check(alt_principal, ca, profile_id)