[Twisted-Python] Clarification for IReactorSSL.ListenSSL(...)

Carl Waldbieser waldbie at attglobal.net
Thu Apr 8 18:55:38 MDT 2004


I have been playing with the Twisted framework for a while, and it's really 
pretty neat!  Admittedly, the Interfaces and deffereds threw me for a loop 
for a while, but I think I'm finally starting to understand some of it.  I 
have already created a simple, stand-alone XMLRPC sever from following the 
examples in the docs, and now I'm trying to make one that runs over HTTPS.  I 
think that all I should have to do is substitute the 
IReacorSSL.ListenSSL(...) method for the IReactorTCP.ListenTCP(...) call I am 
using now, but this is where I am starting to get stuck.

One of the parameters for the ListenSSL(...) method is contextFactory.  After 
some digging, I think that the only concrete class available right now for 
this is DefaultOpenSSLContextFactory?  I am not entirely clear what the 
parameters used to initialize this object mean, though.  Specifically, the 
privateKeyFileName and certificateFileName are a little sketchy from my point 
of view.  I downloaded OpenSSL and read through the docs, and I Googled 
around for other related articles, etc., but the terminology in all these 
docs is somewhat difficult for me to digest.  Is there some sort of "OpenSSL 
For Dummies" tutorial I can read to figure out what files I am supposed to 
generate and what parameters they correspond to in the 
DefaultOpenSSLContextFactory.__init__(...) method?  

Also, does anyone know of an easier way for generating certificates than going 
through all the manual steps in the OpenSSL docs?  I want to use SSL because 
I want two machines to be able to talk to each other without passing 
sensitive data in the clear, so I am not sure if stuff like certificate 
authorities really need to fit into the picture.  Also, if someone could 
suggest a simpler way to accomplish a secure XMLRPC connection, I would also 
be interested in hearing any thoughts on that.

Any help is appreciated,
Carl Waldbieser





More information about the Twisted-Python mailing list