Skip to content

Commit 187b176

Browse files
committed
ssl: update test_verify_hostname_on_connect for LibreSSL
This reverts the change made to this test case in commit a0e98d4 (Enhance TLS 1.3 support on LibreSSL 3.2/3.3, 2020-12-03). Part of the test case was skipped on LibreSSL because LibreSSL 3.2.2 introduced a stricter check during creation of the extension. The check was then relaxed in LibreSSL 3.4.0.
1 parent e153d6a commit 187b176

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/openssl/test_ssl.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,13 +1075,11 @@ def test_accept_errors_include_peeraddr
10751075

10761076
def test_verify_hostname_on_connect
10771077
ctx_proc = proc { |ctx|
1078-
san = "DNS:a.example.com,DNS:*.b.example.com"
1079-
san += ",DNS:c*.example.com,DNS:d.*.example.com" unless libressl?
10801078
exts = [
10811079
["keyUsage", "keyEncipherment,digitalSignature", true],
1082-
["subjectAltName", san],
1080+
["subjectAltName", "DNS:a.example.com,DNS:*.b.example.com," \
1081+
"DNS:c*.example.com,DNS:d.*.example.com"],
10831082
]
1084-
10851083
ctx.cert = issue_cert(@svr, @svr_key, 4, exts, @ca_cert, @ca_key)
10861084
ctx.key = @svr_key
10871085
}
@@ -1103,7 +1101,6 @@ def test_verify_hostname_on_connect
11031101
["cx.example.com", true],
11041102
["d.x.example.com", false],
11051103
].each do |name, expected_ok|
1106-
next if name.start_with?('cx') if libressl?
11071104
begin
11081105
sock = TCPSocket.new("127.0.0.1", port)
11091106
ssl = OpenSSL::SSL::SSLSocket.new(sock, ctx)

0 commit comments

Comments
 (0)