#!/bin/sh -e
set -e

DIR="$(readlink -e $(dirname "$0"))"

#we need tools from /usr/sbin
PATH="/usr/sbin:/sbin:${PATH}"
export PATH

cd "${ADTTMP}"

#check tinysshd-makekey and tinysshd-printkey
#note that: tinysshd-printkey prints on stderr -> 'allow stderr' in control
rm -rf keydir
tinysshd-makekey keydir
tinysshd-printkey keydir

#check tinysshd server
gcc -o checksshstring "${DIR}/checksshstring.c"
./checksshstring
exit 0
