mirror of https://github.com/omar-polo/gmid.git
add proxying with client certificate test
This commit is contained in:
parent
e6ab6b25fc
commit
c064f3de1d
|
@ -52,5 +52,6 @@ run_test test_fastcgi
|
|||
run_test test_macro_expansion
|
||||
run_test test_174_bugfix
|
||||
run_test test_proxy_relay_to
|
||||
run_test test_proxy_with_certs
|
||||
|
||||
tests_done
|
||||
|
|
|
@ -331,3 +331,25 @@ EOF
|
|||
fetch /
|
||||
check_reply "20 text/gemini" "# hello world"
|
||||
}
|
||||
|
||||
test_proxy_with_certs() {
|
||||
gen_config '' 'require client ca "'$PWD'/testca.pem"'
|
||||
# append config for second host
|
||||
cat <<EOF >> reg.conf
|
||||
server "localhost.local" {
|
||||
cert "$PWD/cert.pem"
|
||||
key "$PWD/key.pem"
|
||||
proxy {
|
||||
relay-to "localhost:$port"
|
||||
cert "$PWD/valid.crt"
|
||||
key "$PWD/valid.key"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
run
|
||||
|
||||
ggflags="-P localhost:$port -H localhost.local"
|
||||
|
||||
fetch /
|
||||
check_reply "20 text/gemini" "# hello world"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue