This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Greg Stark
Recipients Greg Stark, christian.heimes
Date 2017-01-20.12:13:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484914427.68.0.380715465195.issue29334@psf.upfronthosting.co.za>
In-reply-to
Content
In my experiments with the relatively new class SSLObject from the ssl module I've noticed the following behavior(s) which I think can be described as bugs.

The getpeercert() method raises a ValueError exception "handshake not done" even after the handshake has successfully completed. If, however, I call the do_handshake() method *after* the handshake completes, then getpeercert() correctly runs and returns the peer's certificate. So now let's focus on do_handshake(). This method is basically undocumented, which I thought was ok because what it does should be obvious. It does seem to initiate a handshake if it's the first method call after the SSLObject is created. If called afterward, it doesn't outwardly appear to do anything, but as mentioned previously it does magically make the getpeercert() method start working.
History
Date User Action Args
2017-01-20 12:13:47Greg Starksetrecipients: + Greg Stark, christian.heimes
2017-01-20 12:13:47Greg Starksetmessageid: <1484914427.68.0.380715465195.issue29334@psf.upfronthosting.co.za>
2017-01-20 12:13:47Greg Starklinkissue29334 messages
2017-01-20 12:13:46Greg Starkcreate