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 martin.panter
Recipients martin.panter, python-dev
Date 2016-01-29.09:04:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454058268.81.0.231674492009.issue26173@psf.upfronthosting.co.za>
In-reply-to
Content
I was mistaken about what test_wrong_cert() is doing. It tells the _server_ to check the _client’s_ certificate (the opposite way around from HTTPS for example). Now I understand this, I see it is fine for the client to raise ECONNRESET if the server rejected its certificate.

In separate-test.patch, I decoupled test_wrong_cert() from the other three bad_cert_test() tests because they are testing different stuff. Changes to test_wrong_cert():

* Fix ResourceWarning in my previous change by closing the SSL socket
* Catch socket.error rather than OSError to fix the buildbot failures in 2.7 (The change does nothing in Python 3 because they are aliases.)
* Make test_wrong_cert() stricter by only allowing ECONNRESET or SSLError

Changes to the other three tests:

* Moved them to BasicSocketTests and do not run a server
* Only accept SSLError from wrap_socket(), drop OSError handling and connect() call
History
Date User Action Args
2016-01-29 09:04:28martin.pantersetrecipients: + martin.panter, python-dev
2016-01-29 09:04:28martin.pantersetmessageid: <1454058268.81.0.231674492009.issue26173@psf.upfronthosting.co.za>
2016-01-29 09:04:28martin.panterlinkissue26173 messages
2016-01-29 09:04:27martin.pantercreate