ensure ssl

This commit is contained in:
downhill 2018-10-24 17:55:17 +02:00
parent 650b71a7c3
commit ea4c0ec178

View file

@ -26,13 +26,13 @@ if mult_server < 1:
def ldapservers():
# Just one server, no need for a pool
if mult_server == 1:
ldapserver = Server(config['LDAP']['LDAPSERVER1'])
ldapserver = Server(config['LDAP']['LDAPSERVER1'], use_ssl=True)
return ldapserver
# Multiple servers, set up a pool
else:
ldapserver = ServerPool(None)
for x in range(1, (mult_server+1)):
ins = Server(config['LDAP']['LDAPSERVER' + str(x)])
ins = Server(config['LDAP']['LDAPSERVER' + str(x)], use_ssl=True)
ldapserver.add(ins)
return ldapserver