William Lallemand | 689d981 | 2020-11-06 16:24:07 +0100 | [diff] [blame] | 1 | #REGTEST_TYPE=bug |
| 2 | varnishtest "Test for the bug #940" |
| 3 | # Test that the SNI are correcly inserted with the same file multiple times. |
| 4 | |
| 5 | #REQUIRE_VERSION=2.2 |
| 6 | #REQUIRE_OPTIONS=OPENSSL |
| 7 | feature ignore_unknown_macro |
| 8 | |
| 9 | server s1 -repeat 4 { |
| 10 | rxreq |
| 11 | txresp |
| 12 | } -start |
| 13 | |
| 14 | haproxy h1 -conf { |
| 15 | global |
| 16 | tune.ssl.default-dh-param 2048 |
| 17 | crt-base ${testdir} |
| 18 | stats socket "${tmpdir}/h1/stats" level admin |
| 19 | |
| 20 | defaults |
| 21 | mode http |
| 22 | option httplog |
| 23 | log stderr local0 debug err |
| 24 | option logasap |
| 25 | timeout connect 1s |
| 26 | timeout client 1s |
| 27 | timeout server 1s |
| 28 | |
| 29 | |
| 30 | listen clear-lst |
| 31 | bind "fd@${clearlst}" |
| 32 | balance roundrobin |
| 33 | server s1 "${tmpdir}/ssl.sock" ssl verify none sni str(record1.bug940.domain.tld) |
| 34 | server s2 "${tmpdir}/ssl.sock" ssl verify none sni str(record2.bug940.domain.tld) |
| 35 | server s3 "${tmpdir}/ssl.sock" ssl verify none sni str(record3.bug940.domain.tld) |
| 36 | server s4 "${tmpdir}/ssl.sock" ssl verify none sni str(record4.bug940.domain.tld) |
| 37 | |
| 38 | listen ssl-lst |
| 39 | mode http |
| 40 | ${no-htx} option http-use-htx |
| 41 | bind "${tmpdir}/ssl.sock" ssl strict-sni crt-list ${testdir}/simple.crt-list |
| 42 | |
| 43 | server s1 ${s1_addr}:${s1_port} |
| 44 | } -start |
| 45 | |
| 46 | |
| 47 | client c1 -repeat 4 -connect ${h1_clearlst_sock} { |
| 48 | txreq |
| 49 | rxresp |
| 50 | expect resp.status == 200 |
| 51 | } -run |