Wed May 27 07:00:32 2009 UTC ()
Ensure we can't verify an unsigned file
Rename a test filename
Add some comments


(lukem)
diff -r1.2 -r1.3 src/crypto/external/bsd/netpgp/dist/tests/verify.at

cvs diff -r1.2 -r1.3 src/crypto/external/bsd/netpgp/dist/tests/verify.at (expand / switch to unified diff)

--- src/crypto/external/bsd/netpgp/dist/tests/verify.at 2009/05/27 06:47:57 1.2
+++ src/crypto/external/bsd/netpgp/dist/tests/verify.at 2009/05/27 07:00:32 1.3
@@ -1,13 +1,27 @@ @@ -1,13 +1,27 @@
1# $NetBSD: verify.at,v 1.2 2009/05/27 06:47:57 lukem Exp $ 1# $NetBSD: verify.at,v 1.3 2009/05/27 07:00:32 lukem Exp $
2 2
3AT_SETUP([check-verify]) 3AT_SETUP([check-verify])
4 4
5cp ${TOPSRCDIR}/configure a 5cp ${TOPSRCDIR}/configure file1
6 6
7AT_CHECK([$NETPGP --homedir $testhomedir --sign a], 7# Sign the file
 8# XXX: this prompts for a passphrase when the userid doesn't have one
 9AT_CHECK([$NETPGP --homedir $testhomedir --sign file1],
8 [0], [ignore], [ignore]) 10 [0], [ignore], [ignore])
9 11
10AT_CHECK([$NETPGP --homedir $testhomedir --verify a.gpg], 12# Verify the signed file
 13AT_CHECK([$NETPGP --homedir $testhomedir --verify file1.gpg],
11 [0], [ignore], [ignore]) 14 [0], [ignore], [ignore])
12 15
 16# Fail to verify an unsigned file
 17# XXX: determine how to expand $testuserid instead of hard-coding
 18AT_CHECK([$NETPGP --homedir $testhomedir --verify file1],
 19 [1], [ignore],
 20[netpgp: default key set to "C7AB5F325F918728"
 21"file1": No signatures found - is this a signed file?
 22])
 23
 24# XXXTODO: deliberately corrupt file1.gpg and attempt to verify
 25
 26
13AT_CLEANUP 27AT_CLEANUP