diff options
Diffstat (limited to 'install/restart_scripts/renew_ra_cert')
-rw-r--r-- | install/restart_scripts/renew_ra_cert | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/install/restart_scripts/renew_ra_cert b/install/restart_scripts/renew_ra_cert index 919f8fc41..cb3e3683b 100644 --- a/install/restart_scripts/renew_ra_cert +++ b/install/restart_scripts/renew_ra_cert @@ -58,13 +58,15 @@ while attempts < 10: conn = ldap2(shared_instance=False, ldap_uri=api.env.ldap_uri) conn.connect(ccache=ccache) try: - (entry_dn, entry_attrs) = conn.get_entry(dn, ['usercertificate']) + entry_attrs = conn.get_entry(dn, ['usercertificate']) entry_attrs['usercertificate'] = dercert - conn.update_entry(dn, entry_attrs) + conn.update_entry(entry_attrs) except errors.NotFound: - entry_attrs = dict(objectclass=['top', 'pkiuser', 'nscontainer'], - usercertificate=dercert) - conn.add_entry(dn, entry_attrs) + entry_attrs = conn.make_entry( + dn, + objectclass=['top', 'pkiuser', 'nscontainer'], + usercertificate=[dercert]) + conn.add_entry(entry_attrs) except errors.EmptyModlist: pass updated = True |