diff options
-rwxr-xr-x | tests/sign.sh | 21 |
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' + : |