Commit 1b2d7ce3 authored by Niels Möller's avatar Niels Möller

* examples/setup-env, examples/teardown-env: Test environment scripts.

* examples/rsa-verify-test, examples/rsa-sign-test: New test cases.

Rev: src/nettle/examples/rsa-sign-test:1.1
Rev: src/nettle/examples/rsa-verify-test:1.1
Rev: src/nettle/examples/setup-env:1.1
Rev: src/nettle/examples/teardown-env:1.1
parent 374595bb
#! /bin/sh
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
data="$srcdir/nettle-benchmark.c"
if [ -x rsa-sign ] ; then
if ./rsa-sign testkey < "$data" > testsignature ; then
exit 0;
else
exit 1
fi
else
exit 77
fi
#! /bin/sh
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
data="$srcdir/nettle-benchmark.c"
if [ -x rsa-verify ] ; then
if ./rsa-verify testkey.pub testsignature < "$data" ; then
:
else
exit 1;
fi
# Try modifying the data
sed s/128/129/ < "$data" >testdata
if ./rsa-verify testkey.pub testsignature < testdata 2>/dev/null; then
exit 1
fi
# Try modifying the signature
sed s/1/2/ <testsignature > testsignature2
if ./rsa-verify testkey.pub testsignature2 < "$data" 2>/dev/null; then
exit 1;
fi
exit 0
else
exit 77
fi
#! /bin/sh
if [ -x rsa-keygen ] ; then
./rsa-keygen -r rsa-keygen -o testkey || exit 1
fi
#! /bin/sh
rm -rf testkey testkey.pub testsignature
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment