[Twisted-Python] Perspective broker and SSL
Sean Hollingsworth
smhollingsworth at gmail.com
Thu Jul 9 11:23:04 EDT 2009
I'm trying to add SSL support to an app that makes use of Perspective
Broker. In my server I have the following:
ccf = ssl.ContextFactory()
ccf.method = SSL.TLSv1_METHOD
reactor.listenSSL(PORT, pb.PBServerFactory(RLFactory()), ccf)
and in my client I have this:
ccf = ssl.ClientContextFactory()
ccf.method = SSL.TLSv1_METHOD
reactor.connectSSL(server, MY_PORT, factory, ccf)
factory.getRootObject().addCallbacks(self._connected, self._connectFail)
When the client connects to the server, I get this:
2009/07/09 15:18 +0000 [Broker,0,216.162.33.146] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line
48, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line
33, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python2.5/site-packages/twisted/python/context.py",
line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python2.5/site-packages/twisted/python/context.py",
line 37, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File
"/usr/lib/python2.5/site-packages/twisted/internet/selectreactor.py", line
139, in _doReadOrWrite
why = getattr(selectable, method)()
File "/usr/lib/python2.5/site-packages/twisted/internet/tcp.py", line
362, in doRead
return self.protocol.dataReceived(data)
File "/usr/lib/python2.5/site-packages/twisted/spread/banana.py", line
215, in dataReceived
raise NotImplementedError(("Invalid Type Byte %r" % (typebyte,)))
exceptions.NotImplementedError: Invalid Type Byte '\xbd'
Am I going about this wrong or leaving something out?
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090709/5eb79c3c/attachment.htm
More information about the Twisted-Python
mailing list