#REGTEST_TYPE=devel

# This reg-test uses the "set ssl crl-file" command to update a CRL file over the CLI.
# It also tests the "abort ssl crl-file" and "show ssl crl-file" commands.
#
# The frontend's certificate is signed by set_cafile_interCA1.crt and is revoked in interCA1_crl.pem
# but not in interCA1_crl_empty.pem.
# The backend's certificate is signed by set_cafile_interCA2.crt and is revoked in interCA2_crl.pem
# but not in interCA2_crl_empty.pem.
#
# The test consists in replacing the two empty CRLs by their not empty equivalent thanks to CLI
# calls and to check that the certificates (frontend and backend) are indeed revoked after the
# update.
#
# It requires socat to upload the certificate
#
# If this test does not work anymore:
# - Check that you have socat

varnishtest "Test the 'set ssl crl-file' feature of the CLI"
feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'"
feature cmd "$HAPROXY_PROGRAM -cc 'feature(OPENSSL) && !ssllib_name_startswith(wolfSSL)'"
feature cmd "command -v socat"

setenv VTC_SOCK_TYPE stream
include ${testdir}/set_ssl_crlfile.vtci
