blob: 7f150561b9395d7500f5763f60afcf45ed3e4435 [file] [log] [blame]
William Lallemand50c03aa2020-11-06 16:24:07 +01001#REGTEST_TYPE=bug
2varnishtest "Test for the bug #940"
Ilya Shipitsinf38a0182020-12-21 01:16:17 +05003# Test that the SNI are correctly inserted with the same file multiple times.
William Lallemand50c03aa2020-11-06 16:24:07 +01004
5#REQUIRE_VERSION=2.2
6#REQUIRE_OPTIONS=OPENSSL
7feature ignore_unknown_macro
8
9server s1 -repeat 4 {
10 rxreq
11 txresp
12} -start
13
14haproxy 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
Willy Tarreauf6739232021-11-18 17:46:22 +010025 timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
26 timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
27 timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
William Lallemand50c03aa2020-11-06 16:24:07 +010028
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
William Lallemand50c03aa2020-11-06 16:24:07 +010040 bind "${tmpdir}/ssl.sock" ssl strict-sni crt-list ${testdir}/simple.crt-list
41
42 server s1 ${s1_addr}:${s1_port}
43} -start
44
45
46client c1 -repeat 4 -connect ${h1_clearlst_sock} {
47 txreq
48 rxresp
49 expect resp.status == 200
50} -run