Skip to content

Commit e182d24

Browse files
catapac000
authored andcommitted
tests: Fixed alt_names in test_tls_sni_same_alt
alt_names should be an array of strings, When it is just a string we end up with an alt_names entry in openssl.cnf which contains: [ alt_names ] DNS.1 = s DNS.2 = a DNS.3 = m DNS.4 = e DNS.5 = . DNS.6 = a DNS.7 = l DNS.8 = t DNS.9 = n DNS.10 = a DNS.11 = m DNS.12 = e DNS.13 = . DNS.14 = c DNS.15 = o DNS.16 = m This may or may not work depending on TLS library due to the '.''s. I.e. OpenSSL accepts them LibreSSL doesn't and errors with 62345808257024:error:22FFF077:X509 V3 routines:CRYPTO_internal:bad object:x509/x509_alt.c:707:name=DNS value='.' What was much more likely intended was to end up with [ alt_names ] DNS.1 = same.altname.com [ Tweaked commit message - Andrew ] Signed-off-by: Andrew Clayton <[email protected]>
1 parent 4b86ad6 commit e182d24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_tls_sni.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ def test_tls_sni_duplicated_bundle():
255255

256256
def test_tls_sni_same_alt():
257257
bundles = {
258-
"localhost": {"subj": "subj1", "alt_names": "same.altname.com"},
259-
"example": {"subj": "subj2", "alt_names": "same.altname.com"},
258+
"localhost": {"subj": "subj1", "alt_names": ["same.altname.com"]},
259+
"example": {"subj": "subj2", "alt_names": ["same.altname.com"]},
260260
}
261261
ctx = config_bundles(bundles)
262262
add_tls(["localhost", "example"])

0 commit comments

Comments
 (0)