test_ssl: use API version to test get_ciphers()#978
test_ssl: use API version to test get_ciphers()#978vstinner wants to merge 1 commit intopython:masterfrom vstinner:ssl_api_version
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). |
| 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.
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.