[pyOpenSSL] how to shutdown a socket?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Wed Aug 22 22:44:12 CEST 2012


On 07:13 pm, asterix at lagaule.org wrote:
>Hi,
>
>I'm having problems closing a OpenSSL.SSL.Conection.

Hi Yann,

Perhaps you can explain your goals in a little more detail.  "Shutdown" 
unfortunately has several possible meanings in the context of an SSL 
connection.

It could mean you want to perform an orderly SSL protocol shutdown. 
There are two variations of this.  You might want to do so without 
shutting down the underlying (TCP?) connection.  Or you might want to 
shut down that underlying connection.

Or it could just mean you want to close the connection, either in an 
orderly fashion or otherwise (people tend to be sloppy about closing SSL 
connections, particularly when using SSL for HTTPS).

Shutdown and close are also distinct operations when it comes to the 
underlying TCP connection.  You might want to actually close the 
underlying TCP connection, rather than just shutting it down.

So, are any of those close to what you want to do?  Please elaborate, 
perhaps providing a short, self-contained, complete (minimal) example in 
doing so (<http://sscce.org/>).

Also, I have copied the Launchpad user list on this reply, as I would 
consider it a great boon if pyOpenSSL eventually completely moved off of 
sourceforge, including no longer using the sourceforge hosted mailing 
list service.

Thanks,
Jean-Paul




More information about the pyopenssl-users mailing list