Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / nettle / examples / rsa-verify-test
blob13c143cb3f4cfe892540fc81aa41324777dabb99
1 #! /bin/sh
3 if [ -z "$srcdir" ] ; then
4 srcdir=`pwd`
5 fi
7 data="$srcdir/nettle-benchmark.c"
9 if [ -x rsa-verify$EXEEXT ] ; then
10 $EMULATOR ./rsa-sign testkey < "$data" > testsignature \
11 && $EMULATOR ./rsa-verify testkey.pub testsignature < "$data" \
12 || exit 1;
14 # Try modifying the data
15 sed s/128/129/ < "$data" >testdata
17 if $EMULATOR ./rsa-verify testkey.pub testsignature < testdata 2>/dev/null; then
18 exit 1
21 # Try modifying the signature
22 sed s/1/2/ <testsignature > testsignature2
23 if $EMULATOR ./rsa-verify testkey.pub testsignature2 < "$data" 2>/dev/null; then
24 exit 1;
26 exit 0
27 else
28 exit 77