[Twisted-Python] Re: using auth over SSL with PB.

Simon Hookway simon at obsidian.com.au
Mon Feb 3 00:57:50 MST 2003


Hi all,

I couldn't find any docs on using pb connections over SSL, so i played
around with using getObjectAtSSL and then using the logIn but can't seem
to get it working. tcpdump shows the connection initiating but nothing
happens after the initial packets.

Here is the bit of code i was using:

from twisted.spread import pb
from twisted.internet import defer,ssl

def connectSSL(host, port, username, password, serviceName,
               perspectiveName=None, client=None, timeout=None):
    d = defer.Deferred()   
    pb.getObjectAtSSL(host, port, ssl.ClientContextFactory(),
                      timeout).addCallbacks(
        pb._connGotRoot, d.errback, 
        callbackArgs=[d, client, serviceName,
                      username, password, perspectiveName])
    return d

Of course, i also edited getObjectAtSSL to include the ctx and pass it 
to the reactor.connectSSL

Cheers,

-- 
Simon Hookway <simon at obsidian.com.au>
Obsidian Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: </pipermail/twisted-python/attachments/20030203/3725e228/attachment.sig>


More information about the Twisted-Python mailing list