diff options
author | cvs2svn <admin@example.com> | 2012-07-13 17:49:55 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2012-07-13 17:49:55 +0000 |
commit | 6fdb436ab2cd5b35066babb3a03be7ad0daf1ae2 (patch) | |
tree | a760cf389e7ea59961bb306a1f50bf5443205176 /src/lib/libssl/test/test_padlock | |
parent | 9204e59073bcf27e1487ec4ac46e981902ddd904 (diff) | |
download | openbsd-OPENBSD_5_2_BASE.tar.gz openbsd-OPENBSD_5_2_BASE.tar.bz2 openbsd-OPENBSD_5_2_BASE.zip |
This commit was manufactured by cvs2git to create tag 'OPENBSD_5_2_BASE'.OPENBSD_5_2_BASE
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 | ||