SSL Issue

Harry George at
Thu Sep 6 07:47:31 CEST 2007

Jurian Botha <jurian at> writes:

> Sorry if this is a real dumb question, but I'm totally stumped.
> I'm trying to connect to a https url in order to do some xml-rpc method
> calls, but I'm getting the following error:
> Error Type: sslerror
> Error Value: (6, 'TLS/SSL connection has been closed')
> What could be causing this error, any clues would be greatly appreciated.
> Thanks
> -- 
> View this message in context:
> Sent from the Python - python-list mailing list archive at

I don't have a complete story, but here are some hints:

1. The message is from:
probably as filtered by 
PyOpenSSL, which has its own issues:

2. Chances are that your certificates are out of whack, or you are
misusing the SSL context parameters, or are not telling the HTTP
Connection object about the SSL Connection properly.

3. Debugging at the python layer is easier (put print statements in
M2Crypto's SSL/Context and SSL/Connection) but if necessary, dive into

4. You can check for the "hello" handshake using WireShark.

5. I haven't found a tutorial for full Python client/server over HTTPS
with verification of both client and server certificates.  If that is
where you are going, let me know what works.

Harry George
PLM Engineering Architecture

More information about the Python-list mailing list