diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-05-29 08:55:00 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-05-29 08:55:00 +0000 |
commit | 4ada0715ffd85900edbd3351e3f68cdf3223a269 (patch) | |
tree | 24cf45b4cbf5b145ebd2f7e532059e89873c4839 /regress/usr.bin | |
parent | 2c7f95dcb85ac26b6086c5f230ae435f4f77765e (diff) |
sync with -p -> -f change, make it work with obj/ ; ok marius@
Diffstat (limited to 'regress/usr.bin')
-rw-r--r-- | regress/usr.bin/gzsig/Makefile | 8 | ||||
-rw-r--r-- | regress/usr.bin/gzsig/gzsig.sh | 42 | ||||
-rw-r--r-- | regress/usr.bin/gzsig/pass.ssh | 1 | ||||
-rw-r--r-- | regress/usr.bin/gzsig/pass.ssh2 | 1 |
4 files changed, 31 insertions, 21 deletions
diff --git a/regress/usr.bin/gzsig/Makefile b/regress/usr.bin/gzsig/Makefile index 176397ece8f..02dea9107e5 100644 --- a/regress/usr.bin/gzsig/Makefile +++ b/regress/usr.bin/gzsig/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.1 2005/05/28 01:58:12 marius Exp $ -# $Id: Makefile,v 1.1 2005/05/28 01:58:12 marius Exp $ +# $OpenBSD: Makefile,v 1.2 2005/05/29 08:54:59 djm Exp $ +# $Id: Makefile,v 1.2 2005/05/29 08:54:59 djm Exp $ regress: - @sh ${.CURDIR}/gzsig.sh + @sh ${.CURDIR}/gzsig.sh ${.CURDIR} -.include <bsd.regress.mk>
\ No newline at end of file +.include <bsd.regress.mk> diff --git a/regress/usr.bin/gzsig/gzsig.sh b/regress/usr.bin/gzsig/gzsig.sh index 2d8d2daa3a7..81dd879ae6e 100644 --- a/regress/usr.bin/gzsig/gzsig.sh +++ b/regress/usr.bin/gzsig/gzsig.sh @@ -1,11 +1,18 @@ #!/bin/sh # -# $OpenBSD: gzsig.sh,v 1.2 2005/05/29 02:41:42 marius Exp $ +# $OpenBSD: gzsig.sh,v 1.3 2005/05/29 08:54:59 djm Exp $ set -e # TODO: add ssh2 +# Location of keys, etc for regress is passed in by make target usually +if [ -z "$1" ] ; then + SRCDIR="." +else + SRCDIR="$1" +fi + KEYS="ssh-rsa ssh2-rsa ssh2-dsa x509-dsa x509-rsa" KEYS_ENC="ssh-rsa-pass ssh2-rsa-pass ssh2-dsa-pass x509-dsa-pass x509-rsa-pass" @@ -14,37 +21,38 @@ gunzip *.gz >/dev/null 2>&1 || true for key in ${KEYS}; do echo "===> $key" >&2 - gzip -f file* - gzsig sign -v $key *.gz - gzsig verify -v $key.pub *.gz - gunzip *.gz + for x in ${SRCDIR}/file*[0-9] ; do gzip -f < $x > `basename ${x}`-t.gz ; done + gzsig sign -v ${SRCDIR}/$key file*-t.gz + gzsig verify -v ${SRCDIR}/$key.pub file*-t.gz + gzcat file*-t.gz >/dev/null done for key in ${KEYS_ENC}; do echo "===> $key" >&2 - gzip -f file* + for x in ${SRCDIR}/file*[0-9] ; do gzip -f < $x > `basename ${x}`-t.gz ; done # SSH2 keys require longer passwords if [ "$key" != "${key#ssh2}" ]; then - pass=asdfg + pass=pass.ssh2 else - pass=asdf + pass=pass.ssh fi - gzsig sign -v -p $pass $key *.gz - gzsig verify -v $key.pub *.gz - gunzip *.gz + gzsig sign -v -f ${SRCDIR}/$pass ${SRCDIR}/$key file*-t.gz + gzsig verify -v ${SRCDIR}/$key.pub file*-t.gz + gzcat file*-t.gz >/dev/null done echo -n "Generating random data..." -dd if=/dev/urandom of=rand bs=1024k count=2 > /dev/null 2>&1 +dd if=/dev/arandom of=masterrand bs=1024k count=2 > /dev/null 2>&1 echo "done." for key in ${KEYS}; do echo "===> $key" >&2 + cp masterrand rand gzip -f rand - gzsig sign -v $key < rand.gz > rand2.gz - gzsig verify -v $key.pub < rand2.gz - rm -f rand2.gz - gunzip *.gz + gzsig sign -v ${SRCDIR}/$key < rand.gz > rand2.gz + gzsig verify -v ${SRCDIR}/$key.pub < rand2.gz + gzcat rand*.gz > /dev/null + rm -f rand* done -rm -f rand +rm -f masterrand rand file*-t* *.gz diff --git a/regress/usr.bin/gzsig/pass.ssh b/regress/usr.bin/gzsig/pass.ssh new file mode 100644 index 00000000000..8bd6648ed13 --- /dev/null +++ b/regress/usr.bin/gzsig/pass.ssh @@ -0,0 +1 @@ +asdf diff --git a/regress/usr.bin/gzsig/pass.ssh2 b/regress/usr.bin/gzsig/pass.ssh2 new file mode 100644 index 00000000000..7452f42f7ac --- /dev/null +++ b/regress/usr.bin/gzsig/pass.ssh2 @@ -0,0 +1 @@ +asdfg |