Module Name:    src
Committed By:   lukem
Date:           Wed May 27 07:00:32 UTC 2009

Modified Files:
        src/crypto/external/bsd/netpgp/dist/tests: verify.at

Log Message:
Ensure we can't verify an unsigned file
Rename a test filename
Add some comments


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/netpgp/dist/tests/verify.at

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/tests/verify.at
diff -u src/crypto/external/bsd/netpgp/dist/tests/verify.at:1.2 src/crypto/external/bsd/netpgp/dist/tests/verify.at:1.3
--- src/crypto/external/bsd/netpgp/dist/tests/verify.at:1.2	Wed May 27 06:47:57 2009
+++ src/crypto/external/bsd/netpgp/dist/tests/verify.at	Wed May 27 07:00:32 2009
@@ -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

Reply via email to