Ensure we can't verify an unsigned file

Rename a test filename
Add some comments
This commit is contained in:
lukem 2009-05-27 07:00:32 +00:00
parent 0f17222c1c
commit 9fe7631b77

View File

@ -1,13 +1,27 @@
# $NetBSD: verify.at,v 1.2 2009/05/27 06:47:57 lukem Exp $
# $NetBSD: verify.at,v 1.3 2009/05/27 07:00:32 lukem Exp $
AT_SETUP([check-verify])
cp ${TOPSRCDIR}/configure a
cp ${TOPSRCDIR}/configure file1
AT_CHECK([$NETPGP --homedir $testhomedir --sign a],
# Sign the file
# XXX: this prompts for a passphrase when the userid doesn't have one
AT_CHECK([$NETPGP --homedir $testhomedir --sign file1],
[0], [ignore], [ignore])
AT_CHECK([$NETPGP --homedir $testhomedir --verify a.gpg],
# Verify the signed file
AT_CHECK([$NETPGP --homedir $testhomedir --verify file1.gpg],
[0], [ignore], [ignore])
# Fail to verify an unsigned file
# XXX: determine how to expand $testuserid instead of hard-coding
AT_CHECK([$NETPGP --homedir $testhomedir --verify file1],
[1], [ignore],
[netpgp: default key set to "C7AB5F325F918728"
"file1": No signatures found - is this a signed file?
])
# XXXTODO: deliberately corrupt file1.gpg and attempt to verify
AT_CLEANUP