[Twisted-Python] PB and hashed passwords
Justin Johnson
justinjohnson at fastmail.fm
Fri Apr 23 06:49:16 MDT 2004
I got PB over SSL working by installing OpenSSL and pyOpenSSL, generating
my own pem by following the instructions at
http://tirian.magd.ox.ac.uk/~nick/openssl-certs/personal.shtml#apache-keys,
and adding the following code on the server-side.
from twisted.internet.ssl import DefaultOpenSSLContextFactory
from OpenSSL.SSL import SSLv23_METHOD
cf = os.path.join(sibpath(__file__, 'ssl'), 'ratcontrol.pem')
pf = os.path.join(sibpath(__file__, 'ssl'), 'ratcontrol.pem')
sslFactory = DefaultOpenSSLContextFactory(cf, pf, SSLv23_METHOD)
[....]
#svc = internet.TCPServer(config['pbport'], factory)
svc = internet.SSLServer(config['pbport'], factory,
contextFactory=sslFactory)
On the client-side I added the following.
from twisted.internet import ssl
[....]
#reactor.connectTCP(server, config.pbPortNumber, factory)
reactor.connectSSL(server, config.pbPortNumber, factory,
ssl.ClientContextFactory())
Of course I can't get any of this to work on Windows because there isn't
any reactor that supports SSL and spawnProcess. :-(
-Justin
On Fri, 23 Apr 2004 03:19:15 -0400, "Stephen Waterbury"
<golux at comcast.net> said:
> Uwe C. Schroeder wrote:
>
> > Would be nice to have ssh with pb :-) Has anyone written that yet ? (don't ask
> > me to volunteer, i've got deadlines up to my neck)
>
> I'm sure it could be done, but you could also just use
> SSL. There was a long thread about PB over SSL on the
> list on 4-5 August 2003.
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
More information about the Twisted-Python
mailing list