Skip to content

Commit

Permalink
Merge pull request #26 from krmarien/master
Browse files Browse the repository at this point in the history
Fix set_option call to LDAP for SSL CERT
  • Loading branch information
AdmiralObvious authored Dec 20, 2016
2 parents 348be0b + d2f52b1 commit 72937d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flask_simpleldap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def init_app(app):

if app.config['LDAP_REQUIRE_CERT']:
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT,
ldap.OPT_X_TLS_DEMAND,
(ldap.OPT_X_TLS_CACERTFILE,
current_app.config['LDAP_CERT_PATH']))
ldap.OPT_X_TLS_DEMAND)
ldap.set_option(ldap.OPT_X_TLS_CACERTFILE,
current_app.config['LDAP_CERT_PATH'])

for option in ['USERNAME', 'PASSWORD', 'BASE_DN']:
if app.config['LDAP_{0}'.format(option)] is None:
Expand Down

0 comments on commit 72937d8

Please sign in to comment.