https://bugs.openldap.org/show_bug.cgi?id=9279
--- Comment #3 from Michael Ströder michael@stroeder.com --- I've added a test for these response controls to python-ldap0 (branch):
https://gitlab.com/ae-dir/python-ldap0/-/tree/its9279
But it seems to fail with wrong response OID for password expiration warning:
DEBUG:root:<ldap0.ldapobject.LDAPObject object at 0x7f7ea896bc10> ldap://127.0.0.1:42853 - LDAPObject.result(((1, 1, -1, True, False, False), {})) 5f1c70f0 ppolicy_bind: Setting warning for password expiry for cn=user1,o=öäü,dc=example,dc=org = 1 seconds 5f1c70f0 conn=1011 op=0 RESULT tag=97 err=0 text= DEBUG:root:-> (97, [], 1, [(b'2.16.840.1.113730.3.4.4', 0, b'\x04\x010')]) [..] AssertionError: <ldap0.controls.pwdpolicy.PasswordExpiredControl object at 0x7f7ea8946a00> is not an instance of <class 'ldap0.controls.pwdpolicy.PasswordExpiringControl'>