webapp/directory: add LDAP_CA_PATH handling
This commit is contained in:
parent
cf82ed5ac4
commit
81e67d28b9
1 changed files with 2 additions and 0 deletions
|
@ -34,6 +34,8 @@ from webapp import mc, cache_enabled, app
|
|||
|
||||
def connect():
|
||||
c = ldap.initialize(app.config['LDAP_URI'])
|
||||
c.set_option(ldap.OPT_X_TLS_CACERTFILE, app.config['LDAP_CA_PATH'])
|
||||
c.set_option(ldap.OPT_X_TLS_NEWCTX, 0)
|
||||
c.start_tls_s()
|
||||
c.simple_bind_s(app.config['LDAP_BIND_DN'],
|
||||
app.config['LDAP_BIND_PASSWORD'])
|
||||
|
|
Loading…
Reference in a new issue