mirror of
https://gitlab.kit.edu/kit/scc/sys/mail/exim-encrypt-dlfunc.git
synced 2025-12-06 07:23:56 +01:00
Changed test output to conform to the TAP protocol (https://testanything.org)
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
PATH=/sbin:/usr/sbin:$PATH
|
||||
|
||||
# this script implements the TAP protocol (https://testanything.org)
|
||||
echo 1..2
|
||||
|
||||
# copy to /tmp to keep call to exim under 256 chars (prevent problems on Ubuntu)
|
||||
install -t /tmp src/libexim-encrypt-dlfunc.so
|
||||
|
||||
@ -15,9 +17,9 @@ CIPHERTEXT=$(exim -be "\${dlfunc{${LIB}}{sodium_crypto_secretbox_encrypt_passwor
|
||||
DECRYPTED=$(exim -be "\${dlfunc{${LIB}}{sodium_crypto_secretbox_decrypt_password}{${PASSWORD}}{${CIPHERTEXT}}}")
|
||||
|
||||
if [ "${CLEARTEXT}" == "${DECRYPTED}" ] ; then
|
||||
echo "secretbox test successful"
|
||||
echo "ok 1 - secretbox test successful"
|
||||
else
|
||||
echo "secretbox test unsuccessful"
|
||||
echo "not ok 1 - secretbox test unsuccessful"
|
||||
exit 127
|
||||
fi
|
||||
|
||||
@ -30,8 +32,8 @@ CIPHERTEXT=$(exim -be "\${dlfunc{${LIB}}{sodium_crypto_box_seal}{${PK}}{${CLEART
|
||||
DECRYPTED=$(exim -be "\${dlfunc{${LIB}}{sodium_crypto_box_seal_open}{${SK}}{${PK}}{${CIPHERTEXT}}}")
|
||||
|
||||
if [ "${CLEARTEXT}" == "${DECRYPTED}" ] ; then
|
||||
echo "sealed_box test successful"
|
||||
echo "ok 2 - sealed_box test successful"
|
||||
else
|
||||
echo "sealed_box test unsuccessful"
|
||||
echo "ok 2 - sealed_box test unsuccessful"
|
||||
exit 128
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user