mirror of https://github.com/wolfSSL/wolfssh.git
add additional x509 connection test
parent
e8f34afe6e
commit
0a24dccd7f
|
@ -26,11 +26,15 @@ PermitEmptyPasswords no
|
||||||
UsePrivilegeSeparation no
|
UsePrivilegeSeparation no
|
||||||
UseDNS no
|
UseDNS no
|
||||||
|
|
||||||
TrustedUserCAKeys $PWD/ca-cert-ecc.pem
|
TrustedUserCAKeys $PWD/../../../keys/ca-cert-ecc.pem
|
||||||
HostKey $PWD/server-key.pem
|
HostKey $PWD/../../../keys/server-key.pem
|
||||||
HostCertificate $PWD/server-cert.pem
|
HostCertificate $PWD/../../../keys/server-cert.pem
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cd ../../../keys/
|
||||||
|
./renewcerts.sh $1
|
||||||
|
cd ../apps/wolfsshd/test/
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,16 @@
|
||||||
|
|
||||||
echo "Running all wolfSSHd tests"
|
echo "Running all wolfSSHd tests"
|
||||||
|
|
||||||
TEST_HOST=$1
|
USER=$1
|
||||||
TEST_PORT=$2
|
TEST_HOST=$2
|
||||||
|
TEST_PORT=$3
|
||||||
TOTAL=0
|
TOTAL=0
|
||||||
SKIPPED=0
|
SKIPPED=0
|
||||||
|
|
||||||
# setup
|
# setup
|
||||||
set -e
|
set -e
|
||||||
./create_authorized_test_file.sh
|
./create_authorized_test_file.sh
|
||||||
./create_sshd_config.sh
|
./create_sshd_config.sh $USER
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
if [ ! -z "$TEST_HOST" ] && [ ! -z "$TEST_PORT" ]; then
|
if [ ! -z "$TEST_HOST" ] && [ ! -z "$TEST_PORT" ]; then
|
||||||
|
@ -31,7 +32,7 @@ fi
|
||||||
|
|
||||||
run_test() {
|
run_test() {
|
||||||
printf "$1 ... "
|
printf "$1 ... "
|
||||||
./"$1" "$TEST_HOST" "$TEST_PORT" &> stdout.txt
|
./"$1" "$TEST_HOST" "$TEST_PORT" "$USER" &> stdout.txt
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
TOTAL=$((TOTAL+1))
|
TOTAL=$((TOTAL+1))
|
||||||
if [ "$RESULT" == 77 ]; then
|
if [ "$RESULT" == 77 ]; then
|
||||||
|
@ -73,6 +74,16 @@ else
|
||||||
SKIPPED=$((SKIPPED+1))
|
SKIPPED=$((SKIPPED+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# these tests run with X509 sshd-config loaded
|
||||||
|
if [ "$USING_LOCAL_HOST" == 1 ]; then
|
||||||
|
start_wolfsshd "sshd_config_test_x509"
|
||||||
|
fi
|
||||||
|
run_test "sshd_x509_test.sh"
|
||||||
|
if [ "$USING_LOCAL_HOST" == 1 ]; then
|
||||||
|
printf "Shutting down test wolfSSHd\n"
|
||||||
|
stop_wolfsshd
|
||||||
|
fi
|
||||||
|
|
||||||
printf "All tests ran, $TOTAL passed, $SKIPPED skipped\n"
|
printf "All tests ran, $TOTAL passed, $SKIPPED skipped\n"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue