From b9c94eebbd3e2faf3d11506d46fec5771132caec Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 10 Apr 2019 15:48:40 -0400 Subject: tests/sign.sh: Improve descriptions and check old key --- diff --git a/tests/sign.sh b/tests/sign.sh index 293034d..c0b46a1 100755 --- a/tests/sign.sh +++ b/tests/sign.sh @@ -22,7 +22,7 @@ . tap-functions.sh . opk.sh -plan_ 10 +plan_ 12 if ${EMBEDDED_USIGN}; then usign="${abs_top_builddir}/3rdparty/usign/usign" @@ -51,21 +51,22 @@ command_ok_ 'verification' -- \ -p 'archive/key.pub' \ -x 'archive/feeds/dev/trunk/arch/plat/base/Packages.sig' -command_ok_ 'verification' -- not \ +command_ok_ 'verification of wrong file' -- not \ "${usign}" -V -m 'archive/feeds/dev/trunk/arch/plat/base/Packages.gz' \ -p 'archive/key.pub' \ -x 'archive/feeds/dev/trunk/arch/plat/base/Packages.sig' +mv 'archive/key.pub' 'archive/key.pub.old' command_ok_ 'key generation' -- \ "${usign}" -G -c 'archive signing key' \ -p 'archive/key.pub' -s 'archive/key' -command_ok_ 'verification' -- not \ +command_ok_ 'verification with wrong key' -- not \ "${usign}" -V -m 'archive/feeds/dev/trunk/arch/plat/base/Packages' \ -p 'archive/key.pub' \ -x 'archive/feeds/dev/trunk/arch/plat/base/Packages.sig' -command_ok_ 'verification' -- not \ +command_ok_ 'verification with wrong key' -- not \ "${usign}" -V -m 'archive/feeds/dev/trunk/arch/plat/base/Packages.gz' \ -p 'archive/key.pub' \ -x 'archive/feeds/dev/trunk/arch/plat/base/Packages.sig' @@ -78,9 +79,19 @@ command_ok_ 'verification' -- \ -p 'archive/key.pub' \ -x 'archive/feeds/dev/trunk/arch/plat/base/Packages.sig' -command_ok_ 'verification' -- not \ +command_ok_ 'verification of wrong file' -- not \ "${usign}" -V -m 'archive/feeds/dev/trunk/arch/plat/base/Packages.gz' \ -p 'archive/key.pub' \ -x 'archive/feeds/dev/trunk/arch/plat/base/Packages.sig' +command_ok_ 'verification with wrong key' -- not \ + "${usign}" -V -m 'archive/feeds/dev/trunk/arch/plat/base/Packages' \ + -p 'archive/key.pub.old' \ + -x 'archive/feeds/dev/trunk/arch/plat/base/Packages.sig' + +command_ok_ 'verification with wrong key' -- not \ + "${usign}" -V -m 'archive/feeds/dev/trunk/arch/plat/base/Packages.gz' \ + -p 'archive/key.pub.old' \ + -x 'archive/feeds/dev/trunk/arch/plat/base/Packages.sig' + : -- cgit v0.9.1