diff --git a/scripts/crl-revoked.test b/scripts/crl-revoked.test index e49611c64..9d7f7eba0 100755 --- a/scripts/crl-revoked.test +++ b/scripts/crl-revoked.test @@ -1,6 +1,7 @@ -#!/bin/sh +#!/bin/bash #crl.test +CERT_DIR=certs # if we can, isolate the network namespace to eliminate port collisions. if [ "${AM_BWRAPPED-}" != "yes" ]; then @@ -70,7 +71,8 @@ run_test() { # mutex lock, -c loads the revoked certificate. We capture the processid # into the variable server_pid ./examples/server/server -R $ready_file -p $crl_port \ - -c certs/server-revoked-cert.pem -k certs/server-revoked-key.pem & + -c ${CERT_DIR}/server-revoked-cert.pem \ + -k ${CERT_DIR}/server-revoked-key.pem & server_pid=$! while [ ! -s $ready_file -a "$counter" -lt 20 ]; do diff --git a/scripts/ocsp-stapling-with-ca-as-responder.test b/scripts/ocsp-stapling-with-ca-as-responder.test index faccf985f..0991b4569 100755 --- a/scripts/ocsp-stapling-with-ca-as-responder.test +++ b/scripts/ocsp-stapling-with-ca-as-responder.test @@ -2,6 +2,8 @@ # ocsp-stapling-with-ca-as-responder.test +SCRIPT_DIR="$(dirname "$0")" + # if we can, isolate the network namespace to eliminate port collisions. if [ "${AM_BWRAPPED-}" != "yes" ]; then bwrap_path="$(command -v bwrap)" @@ -32,7 +34,7 @@ PARENTDIR="$PWD" WORKSPACE="${PARENTDIR}/workspace.pid$$" mkdir "${WORKSPACE}" || exit $? -cp -pR certs "${WORKSPACE}"/ || exit $? +cp -pR ${SCRIPT_DIR}/../certs "${WORKSPACE}"/ || exit $? cd "$WORKSPACE" || exit $? ln -s ../examples diff --git a/scripts/ocsp-stapling.test b/scripts/ocsp-stapling.test index eb7244645..7a1583138 100755 --- a/scripts/ocsp-stapling.test +++ b/scripts/ocsp-stapling.test @@ -5,6 +5,8 @@ # Note, this script makes connection(s) to the public Internet. +SCRIPT_DIR="$(dirname "$0")" + if [[ -z "${RETRIES_REMAINING-}" ]]; then export RETRIES_REMAINING=2 fi @@ -51,7 +53,7 @@ PARENTDIR="$PWD" WORKSPACE="${PARENTDIR}/workspace.pid$$" mkdir "${WORKSPACE}" || exit $? -cp -pR certs "${WORKSPACE}"/ || exit $? +cp -pR ${SCRIPT_DIR}/../certs "${WORKSPACE}"/ || exit $? cd "$WORKSPACE" || exit $? ln -s ../examples @@ -270,7 +272,7 @@ sleep 0.1 # client test against the server server=login.live.com #ca=certs/external/baltimore-cybertrust-root.pem -ca=certs/external/ca_collection.pem +ca=./certs/external/ca_collection.pem if [[ "$V4V6" == "4" ]]; then ./examples/client/client -C -h $server -p 443 -A $ca -g -W 1 diff --git a/scripts/ocsp-stapling2.test b/scripts/ocsp-stapling2.test index 55c0c716a..70a9ab857 100755 --- a/scripts/ocsp-stapling2.test +++ b/scripts/ocsp-stapling2.test @@ -3,6 +3,8 @@ # ocsp-stapling2.test # Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST_V2 +SCRIPT_DIR="$(dirname "$0")" + # if we can, isolate the network namespace to eliminate port collisions. if [ "${AM_BWRAPPED-}" != "yes" ]; then bwrap_path="$(command -v bwrap)" @@ -51,7 +53,7 @@ PARENTDIR="$PWD" WORKSPACE="${PARENTDIR}/workspace.pid$$" mkdir "${WORKSPACE}" || exit $? -cp -pR certs "${WORKSPACE}"/ || exit $? +cp -pR ${SCRIPT_DIR}/../certs "${WORKSPACE}"/ || exit $? cd "$WORKSPACE" || exit $? ln -s ../examples diff --git a/scripts/ocsp.test b/scripts/ocsp.test index a939ca229..74231b404 100755 --- a/scripts/ocsp.test +++ b/scripts/ocsp.test @@ -4,6 +4,8 @@ # Note, this script makes connection(s) to the public Internet. +SCRIPT_DIR="$(dirname "$0")" + server=www.globalsign.com ca=certs/external/ca-globalsign-root.pem @@ -25,7 +27,7 @@ if [ "$OUTPUT" = "SNI is: ON" ]; then printf '\n\n%s\n\n' "SNI is on, proceed with globalsign test" # is our desired server there? - ./scripts/ping.test $server 2 + ${SCRIPT_DIR}/ping.test $server 2 RESULT=$? if [ $RESULT -ne 0 ]; then GL_UNREACHABLE=1 @@ -45,10 +47,10 @@ else fi server=www.google.com -ca=certs/external/ca-google-root.pem +ca=${SCRIPT_DIR}/../certs/external/ca-google-root.pem # is our desired server there? -./scripts/ping.test $server 2 +${SCRIPT_DIR}/ping.test $server 2 RESULT=$? if [ $RESULT -eq 0 ]; then # client test against the server