Ensure we can't verify an unsigned file
Rename a test filename Add some comments
This commit is contained in:
parent
0f17222c1c
commit
9fe7631b77
22
crypto/external/bsd/netpgp/dist/tests/verify.at
vendored
22
crypto/external/bsd/netpgp/dist/tests/verify.at
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user