blob: a5ba189c98560b5a64cd2c4e4becc7ba4d8c6810 [file] [log] [blame]
William Lallemand8f04e182020-11-10 22:40:24 +01001#REGTEST_TYPE=broken
William Lallemand3ff95912020-11-06 14:46:36 +01002varnishtest "Test for the bug #810 and #818"
3# This test checks if the multiple certificate types works correctly with the
4# SNI, and that the negative filters are correctly excluded
5
6
7#REQUIRE_VERSION=2.2
8#REQUIRE_OPTIONS=OPENSSL
9feature ignore_unknown_macro
10
11server s1 -repeat 3 {
12 rxreq
13 txresp
14} -start
15
16haproxy h1 -conf {
17 global
18 tune.ssl.default-dh-param 2048
19 crt-base ${testdir}
20 stats socket "${tmpdir}/h1/stats" level admin
21
22 defaults
23 mode http
24 option httplog
25 log stderr local0 debug err
26 option logasap
27 timeout connect 1s
28 timeout client 1s
29 timeout server 1s
30
31
32 listen clear-lst
33 bind "fd@${clearlst}"
34 balance roundrobin
35 server s1 "${tmpdir}/ssl.sock" ssl verify none sni str(another-record.bug810.domain.tld) ssl-min-ver TLSv1.2 ssl-max-ver TLSv1.2 ciphers "kRSA"
36 server s2 "${tmpdir}/ssl.sock" ssl verify none sni str(another-record.bug810.domain.tld) ssl-min-ver TLSv1.2 ssl-max-ver TLSv1.2 ciphers "aECDSA"
37 server s3 "${tmpdir}/ssl.sock" ssl verify none sni str(another-record.bug818.domain.tld) ssl-min-ver TLSv1.2 ssl-max-ver TLSv1.2 ciphers "kRSA"
38
39 listen ssl-lst
40 mode http
41 ${no-htx} option http-use-htx
42 bind "${tmpdir}/ssl.sock" ssl strict-sni ssl-min-ver TLSv1.2 ssl-max-ver TLSv1.2 ciphers "kRSA:aECDSA" crt-list ${testdir}/filters.crt-list
43
44 server s1 ${s1_addr}:${s1_port}
45} -start
46
47
48client c1 -connect ${h1_clearlst_sock} {
49 txreq
50 rxresp
51 expect resp.status == 200
52} -run
53
54client c1 -connect ${h1_clearlst_sock} {
55 txreq
56 rxresp
57 expect resp.status == 200
58} -run
59
60client c1 -connect ${h1_clearlst_sock} {
61 txreq
62 rxresp
63 expect resp.status == 503
64} -run