Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

test_ssl: use API version to test get_ciphers()#978

Closed
vstinner wants to merge 1 commit into
python:masterpython/cpython:masterfrom
vstinner:ssl_api_versionCopy head branch name to clipboard
Closed

test_ssl: use API version to test get_ciphers()#978
vstinner wants to merge 1 commit into
python:masterpython/cpython:masterfrom
vstinner:ssl_api_versionCopy head branch name to clipboard

Conversation

@vstinner

@vstinner vstinner commented Apr 3, 2017

Copy link
Copy Markdown
Member

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.

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.
@vstinner

vstinner commented Apr 3, 2017

Copy link
Copy Markdown
Member Author

@edelsohn: Can you please try this change on AIX?

@edelsohn

edelsohn commented Apr 3, 2017

Copy link
Copy Markdown

This test has a number of problems on AIX, possibly related to known problems with ca-cert-bundle.

@tiran

tiran commented Apr 3, 2017

Copy link
Copy Markdown
Member

Note: I'm going to deprecate old versionsand require a recent version of OpenSSL 1.0.2+ or LibreSSL 2.5+ rather soon.

@vstinner

vstinner commented Apr 3, 2017

Copy link
Copy Markdown
Member Author

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:

test_ssl: testing with 'OpenSSL 1.0.2h  3 May 2016' (1, 0, 2, 8, 15)
          under 'AIX-2-00FA74164C00-powerpc-32bit'
          HAS_SNI = True
          OP_ALL = 0x-7ffffc01
          OP_NO_TLSv1_1 = 0x10000000

@vstinner

vstinner commented Apr 3, 2017

Copy link
Copy Markdown
Member Author

@edelsohn: What is the value of ssl._OPENSSL_API_VERSION on this buildbot?

@edelsohn

edelsohn commented Apr 4, 2017 via email

Copy link
Copy Markdown

@vstinner

vstinner commented Apr 4, 2017

Copy link
Copy Markdown
Member Author

Ok, it confirms my guess on the AIX buildbot: API version != OpenSSL version:

  • version: 'OpenSSL 1.0.2h 3 May 2016' (1, 0, 2, 8, 15)
  • API version: (1, 0, 1, 5, 15)

So my change should fix test_ssl.test get_ciphers() on AIX (skip the test).

Comment thread Lib/test/test_ssl.py
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),

Copy link
Copy Markdown
Member Author

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.

@vstinner

Copy link
Copy Markdown
Member Author

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.

@vstinner vstinner closed this Jun 14, 2017
@vstinner vstinner deleted the ssl_api_version branch June 14, 2017 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.