Skip to content

Commit

Permalink
Merge pull request #1121 from glyph/9614-npnalpn-skip
Browse files Browse the repository at this point in the history
Author: reaperhulk

Reviewer: glyph

Fixes: ticket:9614

NPNAndALPNAbsentTests skip iff both are absent

Previously these tests only skipped if they failed to detect NPN on the assumption that ALPN would never be present if NPN was missing. However, NPN is deprecated and we'd like to remove it from cryptography/pyOpenSSL so this test needs to be smarter.

refs ​pyca/cryptography#4765
  • Loading branch information
glyph committed Apr 7, 2019
2 parents 9781978 + 3737bb9 commit 24e48fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Empty file.
7 changes: 4 additions & 3 deletions src/twisted/test/test_sslverify.py
Expand Up @@ -2385,12 +2385,13 @@ class NPNAndALPNAbsentTests(unittest.TestCase):
NPN/ALPN operations fail on platforms that do not support them.
These tests only run on platforms that have a PyOpenSSL version < 0.15,
or an OpenSSL version earlier than 1.0.1
an OpenSSL version earlier than 1.0.1, or an OpenSSL/cryptography built
without NPN support.
"""
if skipSSL:
skip = skipSSL
elif not skipNPN:
skip = "NPN/ALPN is present on this platform"
elif not skipNPN or not skipALPN:
skip = "NPN and/or ALPN is present on this platform"


def test_nextProtocolMechanismsNoNegotiationSupported(self):
Expand Down

0 comments on commit 24e48fc

Please sign in to comment.