diff options
author | Max Romanov <max.romanov@nginx.com> | 2021-07-01 13:56:40 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2021-07-01 13:56:40 +0300 |
commit | cfba69781a18407d5c2020c4e3f3d4fc175a6127 (patch) | |
tree | 11c007046bdff175358fb4d9b3175d28249ac6bf /test | |
parent | c16123e7493118dad698ccac7e56bb475bac7def (diff) | |
download | unit-cfba69781a18407d5c2020c4e3f3d4fc175a6127.tar.gz unit-cfba69781a18407d5c2020c4e3f3d4fc175a6127.tar.bz2 |
Fixing multiple TLS-enabled listeners initialization.
Because of the incorrect 'last' field assignment, multiple listeners with
a TLS certificate did not initialize properly, which caused a router crash
while establishing a connection.
Test with multiple TLS listeners added.
The issue was introduced in the c548e46fe516 commit.
This closes #561 issue on GitHub.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_tls.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_tls.py b/test/test_tls.py index 0cfeaded..546f0f89 100644 --- a/test/test_tls.py +++ b/test/test_tls.py @@ -665,3 +665,16 @@ basicConstraints = critical,CA:TRUE""" ) assert res['status'] == 200, 'status ok' assert res['body'] == filename + data + + def test_tls_multi_listener(self): + self.load('empty') + + self.certificate() + + self.add_tls() + self.add_tls(port=7081) + + assert self.get_ssl()['status'] == 200, 'listener #1' + + assert self.get_ssl(port=7081)['status'] == 200, 'listener #2' + |