Python LDAP

From Dogtag
Jump to: navigation, search

CA Certificate Directory

ldap.set_option(ldap.OPT_X_TLS_CACERTDIR, nssdb_dir)

Client Certificate Authentication

ldap.set_option(ldap.OPT_X_TLS_CERTFILE, client_cert_nickname)
ldap.set_option(ldap.OPT_X_TLS_KEYFILE, password_file)

Initialization

connection = ldap.initialize(url)

Basic Authentication

connection.simple_bind_s(bind_dn, bind_password)

See Also