1
0
mirror of https://github.com/5im-0n/sshenc.sh.git synced 2025-08-02 19:30:05 +02:00

refactor test

This commit is contained in:
s2
2019-11-25 16:19:08 +01:00
parent a7c3e85125
commit 61c63ef70e

View File

@@ -10,24 +10,15 @@ plaintext=$(cat sometext)
echo -n 'testing multiple pubkeys: ' echo -n 'testing multiple pubkeys: '
../sshenc.sh -p id_rsa-1.pub -p id_rsa-2.pub -p id_rsa-3.pub < sometext > $tempfile ../sshenc.sh -p id_rsa-1.pub -p id_rsa-2.pub -p id_rsa-3.pub < sometext > $tempfile
cyph=$(../sshenc.sh -s id_rsa-1 < $tempfile)
if [ "$cyph" == "$plaintext" ]; then for i in {1..3}; do
echo -n "key1: ✓ " cyph=$(../sshenc.sh -s id_rsa-$i < $tempfile)
else if [ "$cyph" == "$plaintext" ]; then
echo -n "key1: ⛝ " echo -n "key$i: ✓ "
fi else
cyph=$(../sshenc.sh -s id_rsa-2 < $tempfile) echo -n "key$i: ⛝ "
if [ "$cyph" == "$plaintext" ]; then fi
echo -n "key2: ✓ " done
else
echo -n "key2: ⛝ "
fi
cyph=$(../sshenc.sh -s id_rsa-3 < $tempfile)
if [ "$cyph" == "$plaintext" ]; then
echo -n "key3: ✓ "
else
echo -n "key4: ⛝ "
fi
echo echo
echo done. echo done.