summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/tls.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2022-01-31 23:10:30 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2022-01-31 23:10:30 +0000
commite53ce40c5854d95722cdfc198626fcd5aecbe563 (patch)
treefe3be3f5d9685c29424e84f0f08b9459ea5de37b /test/unit/applications/tls.py
parent485886d8f9a665e9c416a98dd00e5c836b6bf27c (diff)
downloadunit-e53ce40c5854d95722cdfc198626fcd5aecbe563.tar.gz
unit-e53ce40c5854d95722cdfc198626fcd5aecbe563.tar.bz2
Tests: removed TestApplicationTLS.get_server_certificate().
distutils.version is replaced by packaging.version. Also minor style fixes.
Diffstat (limited to '')
-rw-r--r--test/unit/applications/tls.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/test/unit/applications/tls.py b/test/unit/applications/tls.py
index c7254235..93400328 100644
--- a/test/unit/applications/tls.py
+++ b/test/unit/applications/tls.py
@@ -52,21 +52,6 @@ class TestApplicationTLS(TestApplicationProto):
def post_ssl(self, **kwargs):
return self.post(wrapper=self.context.wrap_socket, **kwargs)
- def get_server_certificate(self, addr=('127.0.0.1', 7080)):
-
- ssl_list = dir(ssl)
-
- if 'PROTOCOL_TLS' in ssl_list:
- ssl_version = ssl.PROTOCOL_TLS
-
- elif 'PROTOCOL_TLSv1_2' in ssl_list:
- ssl_version = ssl.PROTOCOL_TLSv1_2
-
- else:
- ssl_version = ssl.PROTOCOL_TLSv1_1
-
- return ssl.get_server_certificate(addr, ssl_version=ssl_version)
-
def openssl_conf(self, rewrite=False, alt_names=[]):
conf_path = option.temp_dir + '/openssl.conf'