-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_ssl: use API version to test get_ciphers() #978
Conversation
On AIX, ssl.SSLContext.get_ciphers() is not available, whereas ssl.OPENSSL_VERSION_INFO is (1, 0, 2, 8, 15). Display also the ssl API version when running test_ssl in verbose mode.
@edelsohn: Can you please try this change on AIX? |
This test has a number of problems on AIX, possibly related to known problems with ca-cert-bundle. |
Note: I'm going to deprecate old versionsand require a recent version of OpenSSL 1.0.2+ or LibreSSL 2.5+ rather soon. |
According to test_ssl output of Python master on AIX, the buildbot slave does use a recent version:
|
@edelsohn: What is the value of ssl._OPENSSL_API_VERSION on this buildbot? |
>> print (ssl._OPENSSL_API_VERSION)
(1, 0, 1, 5, 15)
…On Mon, Apr 3, 2017 at 5:30 PM, Victor Stinner ***@***.***> wrote:
@edelsohn <https://github.com/edelsohn>: What is the value of
ssl._OPENSSL_API_VERSION on this buildbot?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#978 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAowNGkK8vds88K3wCNE6F0DTluyBTq-ks5rsWTkgaJpZM4MxrMy>
.
|
Ok, it confirms my guess on the AIX buildbot: API version != OpenSSL version:
So my change should fix test_ssl.test get_ciphers() on AIX (skip the test). |
@@ -877,7 +877,8 @@ def test_ciphers(self): | |||
with self.assertRaisesRegex(ssl.SSLError, "No cipher can be selected"): | |||
ctx.set_ciphers("^$:,;?*'dorothyx") | |||
|
|||
@unittest.skipIf(ssl.OPENSSL_VERSION_INFO < (1, 0, 2, 0, 0), 'OpenSSL too old') | |||
@unittest.skipIf(ssl._OPENSSL_API_VERSION < (1, 0, 2, 0, 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, the test lacks hasattr () test here.
Sorry, I just lost track of this PR. Since I don't recall exaclty why I wanted to make this change (probably fix a test failure on our AIX buildbot), I will just close it. |
On AIX, ssl.SSLContext.get_ciphers() is not available, whereas
ssl.OPENSSL_VERSION_INFO is (1, 0, 2, 8, 15).
Display also the ssl API version when running test_ssl in verbose
mode.