[Twisted-Python] Re: How to make a secure connection between two computers

Jean-Paul Calderone exarkun at divmod.com
Tue Feb 12 12:27:10 EST 2008

On Tue, 12 Feb 2008 17:27:22 +0100, Martin Geisler <mg at daimi.au.dk> wrote:
>"Noam Raphael" <noamraph at gmail.com> writes:
>> Hello,
>> I want to do a pretty simple thing (I think): I have two computers A
>> and B. I want A to connect to B, where both A verifies that it
>> connected to B and B verifies that it was connected from A. The
>> connection should be encrypted.
>> I assume it can be done by SSL and twisted. I tried quite a bit, but
>> it's too confusing. Perhaps someone can give me a tip? (Some openssl
>> commands to create the needed key/certificate files, and an echoserver
>> and echoclient programs would be really great.)
>I am using TLS via GNUTLS via python-gnutls :-)
>  http://pypi.python.org/pypi/python-gnutls
>As I understand it, TLS is the successor to SSL. Python-gnutls contains
>an example echo server and client that using Twisted and TLS.

Yes, although TLS is commonly referred to as SSL, and Twisted's "SSL"
support is actually support of SSL and TLS.

>To generate the certificates I use this Makefile:
> [snip]

One can also use recent versions of twisted.internet.ssl to generate

See KeyPair, PrivateCertificate, and Certificate (and maybe some other
stuff, if you want) here:



More information about the Twisted-Python mailing list