1
0
mirror of https://github.com/Yubico/yubikey-ksm.git synced 2024-11-29 00:24:14 +01:00

test some failures

This commit is contained in:
Klas Lindfors 2013-11-07 10:14:24 +01:00
parent 208b4ff745
commit 9eec6e7834

View File

@ -40,8 +40,26 @@ set +e
echo '' | php -B "\$_REQUEST = array('otp' => 'idkfefrdhtrutjduvtcjbfeuvhehdvjjlbchtlenfgku');" -F ykksm-decrypt.php | grep -q "^OK counter=0001 low=8d40 high=0f use=00"
if [ $? != 0 ]; then
echo '' | php -B "\$_REQUEST = array('otp' => 'idkfefrdhtrutjduvtcjbfeuvhehdvjjlbchtlenfgku');" -F ykksm-decrypt.php
sudo tail /var/log/apache2/error.log /var/log/apache2/access.log /var/log/auth.log
sudo tail /var/log/auth.log
exit 1
else
echo "Success!"
echo "Success 1"
fi
echo '' | php -B "\$_REQUEST = array('otp' => 'idkfefrdhtrutjduvtcjbfeuvhehdvjjlbchtlenfgkv');" -F ykksm-decrypt.php | grep -q "^ERR Corrupt OTP"
if [ $? != 0 ]; then
echo '' | php -B "\$_REQUEST = array('otp' => 'idkfefrdhtrutjduvtcjbfeuvhehdvjjlbchtlenfgkv');" -F ykksm-decrypt.php
sudo tail /var/log/auth.log
exit 1
else
echo "Success 2"
fi
echo '' | php -B "\$_REQUEST = array('otp' => 'cdkfefrdhtrutjduvtcjbfeuvhehdvjjlbchtlenfgkv');" -F ykksm-decrypt.php | grep -q "^ERR Unknown yubikey"
if [ $? != 0 ]; then
echo '' | php -B "\$_REQUEST = array('otp' => 'cdkfefrdhtrutjduvtcjbfeuvhehdvjjlbchtlenfgkv');" -F ykksm-decrypt.php
sudo tail /var/log/auth.log
exit 1
else
echo "Success 3"
fi