summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-10 15:48:40 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-10 15:48:40 (EDT)
commitb9c94eebbd3e2faf3d11506d46fec5771132caec (patch)
treeb4d98b90e87a0efe46ab07af804960fc4a6c4f08 /tests
parent9663bd94f2e13304783b03f76c7395f52a4c7c18 (diff)
tests/sign.sh: Improve descriptions and check old key
Diffstat (limited to 'tests')
-rwxr-xr-xtests/sign.sh21
1 files changed, 16 insertions, 5 deletions
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'
+
: