Example #1
0
 def _startTLS(self, ctx):
     if not self.connected:
         raise LDAPClientConnectionLostException
     elif self.onwire:
         raise LDAPStartTLSBusyError, self.onwire
     else:
         op = pureldap.LDAPStartTLSRequest()
         d = self.send(op)
         d.addCallback(self._cbStartTLS, ctx)
         return d
Example #2
0
 def _startTLS(self, ctx):
     if not self.connected:
         raise ldapclient.LDAPClientConnectionLostException
     elif self.onwire:
         raise ldapclient.LDAPStartTLSBusyError(self.onwire)
     else:
         op = pureldap.LDAPStartTLSRequest()
         # call super's send to avoid a circular dependency on yield self._tls_ensured
         d = super(ADClientProtocol, self).send(op)
         d.addCallback(self._cbStartTLS, ctx)
         return d