Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1414)

Unified Diff: openssl/test/test_padlock

Issue 9254031: Upgrade chrome's OpenSSL to same version Android ships with. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « openssl/test/tcrl.com ('k') | openssl/test/testca.com » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: openssl/test/test_padlock
===================================================================
--- openssl/test/test_padlock (revision 0)
+++ openssl/test/test_padlock (revision 0)
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+PROG=$1
+
+if [ -x $PROG ]; then
+ if expr "x`$PROG version`" : "xOpenSSL" > /dev/null; then
+ :
+ else
+ echo "$PROG is not OpenSSL executable"
+ exit 1
+ fi
+else
+ echo "$PROG is not executable"
+ exit 1;
+fi
+
+if $PROG engine padlock | grep -v no-ACE; then
+
+ HASH=`cat $PROG | $PROG dgst -hex`
+
+ ACE_ALGS=" aes-128-ecb aes-192-ecb aes-256-ecb \
+ aes-128-cbc aes-192-cbc aes-256-cbc \
+ aes-128-cfb aes-192-cfb aes-256-cfb \
+ aes-128-ofb aes-192-ofb aes-256-ofb"
+
+ nerr=0
+
+ for alg in $ACE_ALGS; do
+ echo $alg
+ TEST=`( cat $PROG | \
+ $PROG enc -e -k "$HASH" -$alg -bufsize 999 -engine padlock | \
+ $PROG enc -d -k "$HASH" -$alg | \
+ $PROG dgst -hex ) 2>/dev/null`
+ if [ "$TEST" != "$HASH" ]; then
+ echo "-$alg encrypt test failed"
+ nerr=`expr $nerr + 1`
+ fi
+ TEST=`( cat $PROG | \
+ $PROG enc -e -k "$HASH" -$alg | \
+ $PROG enc -d -k "$HASH" -$alg -bufsize 999 -engine padlock | \
+ $PROG dgst -hex ) 2>/dev/null`
+ if [ "$TEST" != "$HASH" ]; then
+ echo "-$alg decrypt test failed"
+ nerr=`expr $nerr + 1`
+ fi
+ TEST=`( cat $PROG | \
+ $PROG enc -e -k "$HASH" -$alg -engine padlock | \
+ $PROG enc -d -k "$HASH" -$alg -engine padlock | \
+ $PROG dgst -hex ) 2>/dev/null`
+ if [ "$TEST" != "$HASH" ]; then
+ echo "-$alg en/decrypt test failed"
+ nerr=`expr $nerr + 1`
+ fi
+ done
+
+ if [ $nerr -gt 0 ]; then
+ echo "PadLock ACE test failed."
+ exit 1;
+ fi
+else
+ echo "PadLock ACE is not available"
+fi
+
+exit 0
« no previous file with comments | « openssl/test/tcrl.com ('k') | openssl/test/testca.com » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698