Commit 165627fc authored by Martin Storsjö's avatar Martin Storsjö Committed by Niels Möller

* testsuite/Makefile.in (check): Pass $(EXEEXT) in the environment of

run-tests.
* testsuite/pkcs1-conv-test: Use $EXEEXT and $EMULATOR. Ignore \r
in rsa-sign output.

Rev: nettle/testsuite/Makefile.in:1.17
Rev: nettle/testsuite/pkcs1-conv-test:1.2
parent 56373596
......@@ -89,7 +89,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) \
# The PATH update is for locating dlls on w*ndows.
check: $(TS_ALL) $(srcdir)/run-tests
LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
EMULATOR="$(EMULATOR)" NM="$(NM)" $(srcdir)/run-tests $(TS_ALL)
EMULATOR="$(EMULATOR)" NM="$(NM)" EXEEXT="$(EXEEXT)" \
$(srcdir)/run-tests $(TS_ALL)
Makefile: $(srcdir)/Makefile.in ../config.status
......
......@@ -4,10 +4,10 @@ if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
[ -x ../tools/pkcs1-conv ] || exit 77
[ -x ../tools/pkcs1-conv$EXEEXT ] || exit 77
# Private RSA key, generated by openssl
../tools/pkcs1-conv >testkey.priv <<EOF || exit 1
$EMULATOR ../tools/pkcs1-conv >testkey.priv <<EOF || exit 1
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQC3792bBgQ/mc8aYOFaLEJES/JipmLAeVgznob/Vrzvdcx+bl6L
6gTphctU9ToOLC049dZYW3DJ53owUmbQgqB0vvLTjM9lGSEw4oXLrp7x/XVo/fZM
......@@ -25,7 +25,7 @@ PSVKy/gGBeN1Q7Rj+XoybQ/SqLpfgTYRI9UpbKmpkNuq
-----END RSA PRIVATE KEY-----
EOF
../tools/pkcs1-conv >testkey.pub <<EOF || exit 1
$EMULATOR ../tools/pkcs1-conv >testkey.pub <<EOF || exit 1
# Corresponding public key
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3792bBgQ/mc8aYOFaLEJES/Ji
......@@ -35,16 +35,17 @@ jM9lGSEw4oXLrp7x/XVo/fZMUcRWq5H8Z0l6KANXHwcVcsjjqPBJ6WD/Is3o9rb5
-----END PUBLIC KEY-----
EOF
../examples/rsa-sign testkey.priv >testsignature <<EOF || exit 1
$EMULATOR ../examples/rsa-sign testkey.priv >testtmp <<EOF || exit 1
gazonk
EOF
tr -d '\r' < testtmp > testsignature
# Signature on the data "gazonk\n", using sha1 and the above key
cat > testsignature2 <<EOF && diff testsignature testsignature2 || exit 1
5c96ffe7e925224ce6e98648bf2ed3193cab2fc82af9c7fa7fdc5b623bde1d77c5409129d16d1127ae4fad519c24059fe85f4a4360a900f3dee906e6de2ecd010fa56c02d3f7d0772d43439464a91b025722a6f0b6cb65aee1017b29aff4511f90315caae0be74c2ac496474896e7e3ad200cb7c609ddef5c674272964e4b780
EOF
../examples/rsa-verify testkey.pub testsignature <<EOF || exit 1
$EMULATOR ../examples/rsa-verify testkey.pub testsignature <<EOF || exit 1
gazonk
EOF
......
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