blob: d3353a1295f1b718a92325667448dfdfe7387526 [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
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
47client c1 -repeat 4 -connect ${h1_clearlst_sock} {
48 txreq
49 rxresp
50 expect resp.status == 200
51} -run