Author geertj
Recipients Ben.Darnell, alex, chatgris, christian.heimes, dstufft, ezio.melotti, geertj, giampaolo.rodola, gvanrossum, janssen, pitrou, sbt, vstinner, yselivanov
Date 2014-10-03.10:52:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412333578.09.0.820368378082.issue21965@psf.upfronthosting.co.za>
In-reply-to
Content
New patch attached. This patch makes SSLSocket use SSLObject. The big benefit here is obviously test coverage.

I decided against using SSLObject as a mixin, because all methods need to be reimplemented anyway because for SSLSocket they need to handle the non-SSL case. Instead, I made SSLSocket._sslobj an SSLObject rather than a _ssl._SSLSocket. The patch is rather small, so I kept it incremental to patch4.

Test suite runs fine. I had to update one SSL test (test_unknown_channel_binding). Because the test for the binding type is now in SSLObject, a non-connected SSLSocket will return None even for an unknown binding. Arguably this is even more correct because the binding type can depend on the cryptographic protocol used, e.g. tls-unique doesn't work for SSLv2 (it's currently not checked and nobody cares about SSLv2, I'm just arguing from theory here).

A second change is that the private _sslobj is now a different type. However since this is clearly an internal attribute, I think people that are using this should expect breakage.

Antoine, please let me know if this is now ready for merging in your view or if not what you'd like me to do still. Thanks.
History
Date User Action Args
2014-10-03 10:52:58geertjsetrecipients: + geertj, gvanrossum, janssen, pitrou, vstinner, giampaolo.rodola, christian.heimes, ezio.melotti, alex, sbt, Ben.Darnell, yselivanov, dstufft, chatgris
2014-10-03 10:52:58geertjsetmessageid: <1412333578.09.0.820368378082.issue21965@psf.upfronthosting.co.za>
2014-10-03 10:52:58geertjlinkissue21965 messages
2014-10-03 10:52:57geertjcreate