From 19d163a3903c91b85db8540875c5c637bdf046c5 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 22 Aug 2016 13:34:44 +0200 Subject: tests: added basic test of STARTTLS over FTP for gnutls-cli --- tests/starttls.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/starttls.sh') diff --git a/tests/starttls.sh b/tests/starttls.sh index 0f4dde5ed8..cc55cf7a26 100755 --- a/tests/starttls.sh +++ b/tests/starttls.sh @@ -68,4 +68,19 @@ fi kill ${PID} wait +echo "Checking STARTTLS over FTP" + +eval "${GETPORT}" +socat TCP-LISTEN:${PORT} EXEC:"chat -e -S -v -f ${srcdir}/starttls-ftp.txt",pty & +PID=$! +wait_server ${PID} + +${VALGRIND} "${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:+ANON-ECDH --insecure --starttls-proto ftp --verbose /dev/null +if test $? != 1;then + fail ${PID} "connect should have failed with error code 1" +fi + +kill ${PID} +wait + exit 0 -- cgit v1.2.1