diff options
| author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
| commit | b1ddde874c215cc8891531ed92876f091b7eb83e (patch) | |
| tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/lib/libssl/test/test_padlock | |
| parent | f0a36529837a161734c802ae4c42e84e42347be2 (diff) | |
| download | openbsd-tb_20250414.tar.gz openbsd-tb_20250414.tar.bz2 openbsd-tb_20250414.zip | |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/lib/libssl/test/test_padlock')
| -rwxr-xr-x | src/lib/libssl/test/test_padlock | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/lib/libssl/test/test_padlock b/src/lib/libssl/test/test_padlock deleted file mode 100755 index 5c0f21043c..0000000000 --- a/src/lib/libssl/test/test_padlock +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | PROG=$1 | ||
| 4 | |||
| 5 | if [ -x $PROG ]; then | ||
| 6 | if expr "x`$PROG version`" : "xOpenSSL" > /dev/null; then | ||
| 7 | : | ||
| 8 | else | ||
| 9 | echo "$PROG is not OpenSSL executable" | ||
| 10 | exit 1 | ||
| 11 | fi | ||
| 12 | else | ||
| 13 | echo "$PROG is not executable" | ||
| 14 | exit 1; | ||
| 15 | fi | ||
| 16 | |||
| 17 | if $PROG engine padlock | grep -v no-ACE; then | ||
| 18 | |||
| 19 | HASH=`cat $PROG | $PROG dgst -hex` | ||
| 20 | |||
| 21 | ACE_ALGS=" aes-128-ecb aes-192-ecb aes-256-ecb \ | ||
| 22 | aes-128-cbc aes-192-cbc aes-256-cbc \ | ||
| 23 | aes-128-cfb aes-192-cfb aes-256-cfb \ | ||
| 24 | aes-128-ofb aes-192-ofb aes-256-ofb" | ||
| 25 | |||
| 26 | nerr=0 | ||
| 27 | |||
| 28 | for alg in $ACE_ALGS; do | ||
| 29 | echo $alg | ||
| 30 | TEST=`( cat $PROG | \ | ||
| 31 | $PROG enc -e -k "$HASH" -$alg -bufsize 999 -engine padlock | \ | ||
| 32 | $PROG enc -d -k "$HASH" -$alg | \ | ||
| 33 | $PROG dgst -hex ) 2>/dev/null` | ||
| 34 | if [ "$TEST" != "$HASH" ]; then | ||
| 35 | echo "-$alg encrypt test failed" | ||
| 36 | nerr=`expr $nerr + 1` | ||
| 37 | fi | ||
| 38 | TEST=`( cat $PROG | \ | ||
| 39 | $PROG enc -e -k "$HASH" -$alg | \ | ||
| 40 | $PROG enc -d -k "$HASH" -$alg -bufsize 999 -engine padlock | \ | ||
| 41 | $PROG dgst -hex ) 2>/dev/null` | ||
| 42 | if [ "$TEST" != "$HASH" ]; then | ||
| 43 | echo "-$alg decrypt test failed" | ||
| 44 | nerr=`expr $nerr + 1` | ||
| 45 | fi | ||
| 46 | TEST=`( cat $PROG | \ | ||
| 47 | $PROG enc -e -k "$HASH" -$alg -engine padlock | \ | ||
| 48 | $PROG enc -d -k "$HASH" -$alg -engine padlock | \ | ||
| 49 | $PROG dgst -hex ) 2>/dev/null` | ||
| 50 | if [ "$TEST" != "$HASH" ]; then | ||
| 51 | echo "-$alg en/decrypt test failed" | ||
| 52 | nerr=`expr $nerr + 1` | ||
| 53 | fi | ||
| 54 | done | ||
| 55 | |||
| 56 | if [ $nerr -gt 0 ]; then | ||
| 57 | echo "PadLock ACE test failed." | ||
| 58 | exit 1; | ||
| 59 | fi | ||
| 60 | else | ||
| 61 | echo "PadLock ACE is not available" | ||
| 62 | fi | ||
| 63 | |||
| 64 | exit 0 | ||
