diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2021-05-26 21:47:12 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2021-05-26 21:47:12 +0100 |
commit | 753ce145f7cfbfffab34d18ff74236f09e471f18 (patch) | |
tree | 52feaae5e770f7da07583383bb8b8f9fbb296861 /test/test_tls.py | |
parent | 3f7ccf142ff4d1a11b807a344bcb1e3cb6c3284b (diff) | |
download | unit-753ce145f7cfbfffab34d18ff74236f09e471f18.tar.gz unit-753ce145f7cfbfffab34d18ff74236f09e471f18.tar.bz2 |
Tests: added TLS test without close notify.
Diffstat (limited to 'test/test_tls.py')
-rw-r--r-- | test/test_tls.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test_tls.py b/test/test_tls.py index 3ab6f7d7..0cfeaded 100644 --- a/test/test_tls.py +++ b/test/test_tls.py @@ -2,6 +2,7 @@ import io import re import ssl import subprocess +import time import pytest @@ -501,6 +502,28 @@ basicConstraints = critical,CA:TRUE""" assert resp['body'] == '0123456789', 'keepalive 2' + def test_tls_no_close_notify(self): + self.certificate() + + assert 'success' in self.conf( + { + "listeners": { + "*:7080": { + "pass": "routes", + "tls": {"certificate": "default"}, + } + }, + "routes": [{"action": {"return": 200}}], + "applications": {}, + } + ), 'load application configuration' + + (resp, sock) = self.get_ssl(start=True) + + time.sleep(5) + + sock.close() + @pytest.mark.skip('not yet') def test_tls_keepalive_certificate_remove(self): self.load('empty') |