Show
Ignore:
Timestamp:
12/02/04 23:01:58 (19 years ago)
Author:
jalet
Message:

TLS is now supported with the LDAP backend

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/ldapstorage.py

    r1966 r1968  
    2222# 
    2323# $Log$ 
     24# Revision 1.88  2004/12/02 22:01:58  jalet 
     25# TLS is now supported with the LDAP backend 
     26# 
    2427# Revision 1.87  2004/12/02 12:34:00  jalet 
    2528# Now automates LDAP reconnections if the server dropped the connection due 
     
    353356            try : 
    354357                self.database = ldap.initialize(self.savedhost)  
     358                if self.info["ldaptls"] : 
     359                    # we want TLS 
     360                    ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, self.info["cacert"]) 
     361                    self.database.set_option(ldap.OPT_X_TLS, ldap.OPT_X_TLS_DEMAND) 
     362                    self.database.start_tls_s() 
    355363                self.database.simple_bind_s(self.saveduser, self.savedpasswd) 
    356364                self.basedn = self.saveddbname