mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-25 06:38:02 -05:00
cacert install: fix trust chain validation
https://fedorahosted.org/freeipa/ticket/5612 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
1 parent
d7efd8a33a
commit
ef91346407
1 file changed
+7
@@ -335,10 +335,17 @@ class CACertManage(admintool.AdminTool):
|
||||
|
||||
nickname = options.nickname or str(subject)
|
||||
|
||||
ca_certs = certstore.get_ca_certs_nss(api.Backend.ldap2,
|
||||
api.env.basedn,
|
||||
api.env.realm,
|
||||
False)
|
||||
|
||||
with certs.NSSDatabase() as tmpdb:
|
||||
pw = ipautil.write_tmp_file(ipautil.ipa_generate_password())
|
||||
tmpdb.create_db(pw.name)
|
||||
tmpdb.add_cert(cert, nickname, 'C,,')
|
||||
for ca_cert, ca_nickname, ca_trust_flags in ca_certs:
|
||||
tmpdb.add_cert(ca_cert, ca_nickname, ca_trust_flags)
|
||||
|
||||
try:
|
||||
tmpdb.verify_ca_cert_validity(nickname)
|
||||
|
||||
Reference in new issue
Block a user