You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ENCRYPT_CAPABLE_CERTS = {"Identity card of Estonian citizen", "Identity card of European Union citizen", "Digital identity card", "Diplomatic identity card"}
connect = ldap.initialize(LDAP_SERVER)
connect.set_option(ldap.OPT_REFERRALS, 0)
connect.simple_bind_s()
def get_certs(person_code):
res = connect.search_s(BASE_DN, ldap.SCOPE_SUBTREE, f"{OBJECT_TO_SEARCH}{person_code}")
certs = []
for x in res:
name = x[0]
parts = name.split(",")
for p in parts:
if p.startswith("ou="):
ou = p[3:]
elif p.startswith("o="):
o = p[2:]
if o in ENCRYPT_CAPABLE_CERTS and ou == "Authentication":