summaryrefslogtreecommitdiffhomepage
path: root/test/test_tls_session.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2023-07-10 15:24:15 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2023-07-10 15:24:15 +0100
commit075c6a7038c9a4b2d5a9e6279bf406c83ccc8d27 (patch)
tree906d97f7ef66f2aacb030015e2134c9e7182c9fe /test/test_tls_session.py
parent3c7743344b368ebcc3c1be54e68019923fe45b49 (diff)
downloadunit-075c6a7038c9a4b2d5a9e6279bf406c83ccc8d27.tar.gz
unit-075c6a7038c9a4b2d5a9e6279bf406c83ccc8d27.tar.bz2
Tests: check TLS methods availability more carefully.
Diffstat (limited to '')
-rw-r--r--test/test_tls_session.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_tls_session.py b/test/test_tls_session.py
index 5c099fa0..8b2b04fd 100644
--- a/test/test_tls_session.py
+++ b/test/test_tls_session.py
@@ -73,6 +73,10 @@ def connect(ctx=None, session=None):
)
+@pytest.mark.skipif(
+ not hasattr(_lib, 'SSL_session_reused'),
+ reason='session reuse is not supported',
+)
def test_tls_session():
_, sess, ctx, reused = connect()
assert not reused, 'new connection'
@@ -110,6 +114,10 @@ def test_tls_session():
assert False not in [c[-1] for c in conns_again], 'cache big reuse'
+@pytest.mark.skipif(
+ not hasattr(_lib, 'SSL_session_reused'),
+ reason='session reuse is not supported',
+)
def test_tls_session_timeout():
assert 'success' in add_session(cache_size=5, timeout=1)