The "fail" shell function takes a PID as the first argument.
Signed-off-by: Daiki Ueno <ueno@gnu.org>
wait_server ${PID}
${VALGRIND} "${CLI}" -p "${PORT}" 127.0.0.1 --priority ${EXAMPLE_DISABLED_PRIORITY} --insecure --logfile ${TMPFILE_OBSERVED_LOG} </dev/null >/dev/null ||
- fail "expected connection to succeed (1)"
+ fail "" "expected connection to succeed (1)"
export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE_CONFIG}"
"${CLI}" -p "${PORT}" 127.0.0.1 --priority ${EXAMPLE_DISABLED_PRIORITY} --insecure --logfile ${TMPFILE_OBSERVED_LOG} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
kill ${PID}
wait
unset GNUTLS_SYSTEM_PRIORITY_FILE
${VALGRIND} "${CLI}" -p "${PORT}" 127.0.0.1 --priority ${EXAMPLE_DISABLED_PRIORITY} --insecure --logfile ${TMPFILE_OBSERVED_LOG} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
kill ${PID}
wait
wait_server ${PID}
"${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-CURVE-ALL:+CURVE-SECP256R1:+CURVE-SECP521R1 --insecure --logfile ${TMPFILE2} </dev/null >/dev/null ||
- fail "expected connection to succeed (1)"
+ fail "" "expected connection to succeed (1)"
export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
"${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-CURVE-ALL:+CURVE-SECP256R1:+CURVE-SECP521R1 --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
kill ${PID}
wait
unset GNUTLS_SYSTEM_PRIORITY_FILE
"${CLI}" -p "${PORT}" 127.0.0.1 --priority "NORMAL:-CURVE-ALL:+CURVE-SECP256R1:+CURVE-SECP521R1" --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
kill ${PID}
wait
export GNUTLS_SYSTEM_PRIORITY_FILE="${STOCK_PRIORITY}"
"${CLI}" -p "${PORT}" 127.0.0.1 --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (1)"
+ fail "" "expected connection to fail (1)"
kill ${PID}
wait
export GNUTLS_SYSTEM_PRIORITY_FILE="${STOCK_PRIORITY}"
"${CLI}" -p "${PORT}" 127.0.0.1 --priority "NORMAL:-VERS-TLS1.3" --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
export GNUTLS_SYSTEM_PRIORITY_FILE="${STOCK_PRIORITY}"
"${CLI}" -p "${PORT}" 127.0.0.1 --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.3" --insecure --logfile ${TMPFILE2} </dev/null >/dev/null ||
- fail "expected connection to succeed (1)"
+ fail "" "expected connection to succeed (1)"
kill ${PID}
wait
wait_server ${PID}
"${CLI}" -p "${PORT}" 127.0.0.1 --insecure --logfile ${TMPFILE2} </dev/null >/dev/null ||
- fail "expected connection to succeed (2)"
+ fail "" "expected connection to succeed (2)"
kill ${PID}
wait
wait_server ${PID}
"${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-KX-ALL:+DHE-RSA --insecure --logfile ${TMPFILE2} </dev/null >/dev/null ||
- fail "expected connection to succeed (1)"
+ fail "" "expected connection to succeed (1)"
export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
"${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL:-KX-ALL:+DHE-RSA --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
# test whether the unknown KX will be caught
GNUTLS_SYSTEM_PRIORITY_FAIL_ON_INVALID=1
export GNUTLS_SYSTEM_PRIORITY_FAIL_ON_INVALID
"${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to succeed (3)"
+ fail "" "expected connection to succeed (3)"
unset GNUTLS_SYSTEM_PRIORITY_FAIL_ON_INVALID
unset GNUTLS_SYSTEM_PRIORITY_FILE
"${CLI}" -p "${PORT}" 127.0.0.1 --priority "NORMAL:-KX-ALL:+DHE-RSA" --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
kill ${PID}
wait
unset GNUTLS_SYSTEM_PRIORITY_FILE
"${CLI}" --attime "2017-11-22" -p "${PORT}" 127.0.0.1 --priority NORMAL --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null ||
- fail "expected connection to succeed (1)"
+ fail "" "expected connection to succeed (1)"
export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
"${CLI}" --attime "2017-11-22" -p "${PORT}" 127.0.0.1 --priority NORMAL:%PROFILE_LOW --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null ||
- fail "expected connection to succeed (2)"
+ fail "" "expected connection to succeed (2)"
"${CLI}" --attime "2017-11-22" -p "${PORT}" 127.0.0.1 --priority NORMAL:%PROFILE_MEDIUM --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null ||
- fail "expected connection to succeed (3)"
+ fail "" "expected connection to succeed (3)"
# failure case, 384 bit min-profile, 256 bit key
cat <<_EOF_ > ${TMPFILE}
unset GNUTLS_SYSTEM_PRIORITY_FILE
"${CLI}" --attime "2017-11-22" -p "${PORT}" 127.0.0.1 --priority NORMAL --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null ||
- fail "expected connection to succeed (1)"
+ fail "" "expected connection to succeed (1)"
export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
"${CLI}" --attime "2017-11-22" -p "${PORT}" 127.0.0.1 --priority NORMAL:%PROFILE_LOW --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (1)"
+ fail "" "expected connection to fail (1)"
"${CLI}" --attime "2017-11-22" -p "${PORT}" 127.0.0.1 --priority NORMAL:%PROFILE_MEDIUM --verify-hostname localhost --x509cafile "${srcdir}/certs/ca-cert-ecc.pem" --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
kill ${PID}
wait
export GNUTLS_DEBUG_LEVEL=3
"${CLI}" -p "${PORT}" 127.0.0.1 --priority "NORMAL:-VERS-ALL:+VERS-TLS1.2" --verify-hostname=localhost --x509cafile ${CA} --logfile="$testdir/client.log" </dev/null >/dev/null ||
- fail "expected connection to succeed (1)"
+ fail "" "expected connection to succeed (1)"
# "tls-session-hash" has precedence over %FORCE_SESSION_HASH
"${CLI}" -p "${PORT}" 127.0.0.1 --priority "NORMAL:-VERS-ALL:+VERS-TLS1.2:%FORCE_SESSION_HASH" --verify-hostname=localhost --x509cafile ${CA} --logfile="$testdir/client.log" </dev/null >/dev/null ||
- fail "expected connection to succeed (2)"
+ fail "" "expected connection to succeed (2)"
echo kill ${PID}
kill ${PID}
export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
"${CLI}" -p "${PORT}" 127.0.0.1 --priority "$PRIO" --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (1)"
+ fail "" "expected connection to fail (1)"
kill ${PID}
wait
unset GNUTLS_SYSTEM_PRIORITY_FILE
"${CLI}" -p "${PORT}" 127.0.0.1 --priority "NORMAL:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.3" --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
kill ${PID}
wait
export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
"${CLI}" -p "${PORT}" 127.0.0.1 --priority NORMAL --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (1)"
+ fail "" "expected connection to fail (1)"
kill ${PID}
wait
unset GNUTLS_SYSTEM_PRIORITY_FILE
"${CLI}" -p "${PORT}" 127.0.0.1 --priority "NORMAL:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.3" --insecure --logfile ${TMPFILE2} </dev/null >/dev/null &&
- fail "expected connection to fail (2)"
+ fail "" "expected connection to fail (2)"
kill ${PID}
wait