]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gpo: Fix crash in Cert Auth Enroll RSOP
authorDavid Mulder <dmulder@suse.com>
Tue, 12 Apr 2022 16:25:51 +0000 (10:25 -0600)
committerJeremy Allison <jra@samba.org>
Tue, 3 May 2022 20:55:32 +0000 (20:55 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/gp_cert_auto_enroll_ext.py

index 2e01853108e96358155e78ec2397482f28f69cc5..ab77cbba599942b0835cec1e33059f2b7bd5b76b 100644 (file)
@@ -252,6 +252,8 @@ class gp_cert_auto_enroll_ext(gp_pol_ext):
                     for ca in cas:
                         policy = 'Auto Enrollment Policy'
                         cn = ca['cn'][0]
+                        if policy not in output:
+                            output[policy] = {}
                         output[policy][cn] = {}
                         output[policy][cn]['CA Certificate'] = \
                             format_root_cert(ca['cACertificate'][0]).decode()