-#REGTEST_TYPE=broken
+#REGTEST_TYPE=devel
# broken with BoringSSL.
#
# test1
-# global_option DFLT
-# bind line DFLT (first)
+# global_option OFF
+# bind line DFLT (OFF) (first)
# crt-list ON (second)
shell {
cat << EOF > ${tmpdir}/ocsp_compat_check.list
echo "==== test 1"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test2
echo "==== test 2"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test3
echo "==== test 3"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test4
-# global_option DFLT
-# bind line DFLT (second)
-# crt-list ON (first)
+# global_option OFF
+# bind line DFLT OFF (second)
+# crt-list ON (first)
shell {
cat << EOF > ${tmpdir}/ocsp_compat_check.list
server_ocsp_ecdsa.pem [ocsp-update on] foo.com
echo "==== test 4"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test5
echo "==== test 5"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test6
echo "==== test 6"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test7
haproxy_ret=$?
echo "==== test 7"
echo "$haproxy_output"
- echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test8
echo "==== test 8"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test9
echo "==== test 9"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test10
echo "==== test 10"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test11
echo "==== test 11"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
# test12
echo "==== test 12"
echo "$haproxy_output"
echo "HAProxy return code: $haproxy_ret"
- ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
-}
-
-
-
-
-###########################
-# #
-# GOOD CONFIGURATIONS #
-# #
-###########################
-
-# test1
-# global_option DFLT
-# bind line DFLT (first)
-# crt-list OFF (second)
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem [ocsp-update off] foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
-# ocsp-update.mode on
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt server_ocsp_ecdsa.pem crt-list ${tmpdir}/ocsp_compat_check.list
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test2
-# global_option ON
-# bind line DFLT/ON (first)
-# crt-list ON (second)
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem [ocsp-update on] foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
- ocsp-update.mode on
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt server_ocsp_ecdsa.pem crt-list ${tmpdir}/ocsp_compat_check.list
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test3
-# global_option OFF
-# bind line DFLT/OFF(first)
-# crt-list OFF (second)
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem [ocsp-update off] foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
- ocsp-update.mode off
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt server_ocsp_ecdsa.pem crt-list ${tmpdir}/ocsp_compat_check.list
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test4
-# global_option DFLT
-# bind line DFLT (second)
-# crt-list OFF (first)
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem [ocsp-update off] foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
-# ocsp-update.mode off
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt-list ${tmpdir}/ocsp_compat_check.list
- bind "${tmpdir}/ssl2.sock" ssl crt server_ocsp_ecdsa.pem
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test5
-# global_option ON
-# bind line DFLT (second)
-# crt-list ON (first)
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem [ocsp-update on] foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
- ocsp-update.mode on
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt-list ${tmpdir}/ocsp_compat_check.list
- bind "${tmpdir}/ssl2.sock" ssl crt server_ocsp_ecdsa.pem
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test6
-# global_option OFF
-# bind line DFLT (second)
-# crt-list OFF (first)
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem [ocsp-update off] foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
- ocsp-update.mode off
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt-list ${tmpdir}/ocsp_compat_check.list
- bind "${tmpdir}/ssl2.sock" ssl crt server_ocsp_ecdsa.pem
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
+ [ $haproxy_ret -ne 0 ] && echo "$haproxy_output" | grep -q "different parameter 'ocsp-update'"
}
-# test7
-# global_option DFLT
-# bind line -
-# crt-list OFF
-# crt-list DFLT
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem [ocsp-update off] foo.com
-server_ocsp_ecdsa.pem foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
-# ocsp-update.mode off
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt-list ${tmpdir}/ocsp_compat_check.list
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test8
-# global_option DFLT
-# bind line -
-# crt-list DFLT
-# crt-list OFF
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem foo.com
-server_ocsp_ecdsa.pem [ocsp-update off] foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
-# ocsp-update.mode off
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt-list ${tmpdir}/ocsp_compat_check.list
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test9
-# global_option ON
-# bind line -
-# crt-list ON
-# crt-list DFLT
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem [ocsp-update on] foo.com
-server_ocsp_ecdsa.pem foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
- ocsp-update.mode on
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt-list ${tmpdir}/ocsp_compat_check.list
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test10
-# global_option ON
-# bind line -
-# crt-list DFLT
-# crt-list ON
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem foo.com
-server_ocsp_ecdsa.pem [ocsp-update on] foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
- ocsp-update.mode on
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt-list ${tmpdir}/ocsp_compat_check.list
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test11
-# global_option OFF
-# bind line -
-# crt-list OFF
-# crt-list DFLT
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem [ocsp-update off] foo.com
-server_ocsp_ecdsa.pem foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
- ocsp-update.mode off
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt-list ${tmpdir}/ocsp_compat_check.list
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}
-
-# test12
-# global_option OFF
-# bind line -
-# crt-list DFLT
-# crt-list OFF
-shell {
- cat << EOF > ${tmpdir}/ocsp_compat_check.list
-server_ocsp_ecdsa.pem foo.com
-server_ocsp_ecdsa.pem [ocsp-update off] foo.com
-EOF
-
- cat << EOF > ${tmpdir}/ocsp_compat_check.cfg
-global
- crt-base ${testdir}/ocsp_update/multicert
- ocsp-update.mode off
-
-defaults
- log stderr local0 debug err
- timeout connect 1s
- timeout client 1s
- timeout server 1s
-
-listen ssl-lst
- bind "${tmpdir}/ssl.sock" ssl crt-list ${tmpdir}/ocsp_compat_check.list
- server s1 127.0.0.1:80
-EOF
-
- $HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c
-}