[Twisted-Python] Re: ldaptor.protocols.ldap.ldapclient.startTLS

Christopher Zorn christopher.zorn at gmail.com
Tue Jun 14 16:17:16 EDT 2005

I forgot to attach the patch, sorry, 

On 6/14/05, Christopher Zorn <christopher.zorn at gmail.com> wrote:
> I hope this is the correct place to ask about this, forgive me if it is not.
> I recently tried to use ldaptor. It is great!!
> I ran into one problem though. I wanted to use startTLS and I had to call
> it myself.
> So I put the following in front of some example code :
> d=c.connectAnonymously(config['base'], config['serviceLocationOverrides'])
> #d = c.connect(config['base'], config['serviceLocationOverrides'])
>     def _startTLS(proto):
>         d = proto.startTLS()
>         d.addCallback(lambda _: proto)
>         return d
>     d.addCallback(_startTLS)
> This would hang. I went to find out and there was a deferred created that seemed
> to have been getting lost. It was never called when handle was called in the
> client class.
> I attached a patch that allows me to use startTLS the way I did it, but I do not
> know if this is correct. Please let me know if I am doing something
> wrong or if this
> is actually a bug.
> The patch is to the file ldaptor/protocols/ldap/ldapclient.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldapclient.py.patch
Type: text/x-patch
Size: 394 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20050614/a8cd7e2a/attachment.bin 

More information about the Twisted-Python mailing list