[Twisted-Python] Re: using auth over SSL with PB.
Simon Hookway
simon at obsidian.com.au
Mon Feb 3 02:57:50 EST 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: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030203/3725e228/attachment.pgp
More information about the Twisted-Python
mailing list