diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2021-05-12 14:37:25 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2021-05-12 14:37:25 +0100 |
commit | 25603eae9f8d3c2a6af3c5efb12b4a826776e300 (patch) | |
tree | 6faeade5a5d955b257f45380d40a6e09180fd979 /test/unit/applications/tls.py | |
parent | a0c083af208cd9f676bb56762b4e27a3174a773d (diff) | |
download | unit-25603eae9f8d3c2a6af3c5efb12b4a826776e300.tar.gz unit-25603eae9f8d3c2a6af3c5efb12b4a826776e300.tar.bz2 |
Tests: added test for TLS with IP in SAN.
Diffstat (limited to 'test/unit/applications/tls.py')
-rw-r--r-- | test/unit/applications/tls.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/unit/applications/tls.py b/test/unit/applications/tls.py index 95eeac55..583b618f 100644 --- a/test/unit/applications/tls.py +++ b/test/unit/applications/tls.py @@ -76,9 +76,14 @@ class TestApplicationTLS(TestApplicationProto): # Generates alt_names section with dns names a_names = "[alt_names]\n" for i, k in enumerate(alt_names, 1): - a_names += "DNS.%d = %s\n" % (i, k) + k = k.split('|') - # Generates section for sign request extension + if k[0] == 'IP': + a_names += "IP.%d = %s\n" % (i, k[1]) + else: + a_names += "DNS.%d = %s\n" % (i, k[0]) + + # Generates section for sign request extension a_sec = """req_extensions = myca_req_extensions [ myca_req_extensions ] |