xref: /netbsd/crypto/external/bsd/netpgp/dist/tests/cat.at (revision 6808773a)
1*6808773aSagc# $NetBSD: cat.at,v 1.6 2009/06/11 06:45:11 agc Exp $
2a95ce5aeSagc
3a95ce5aeSagcAT_SETUP([attached signature and verification])
4a95ce5aeSagc
590194f6dSlukemAT_CHECK([cp $abs_top_builddir/libtool file3], [0], [ignore], [ignore])
6a95ce5aeSagc
7a95ce5aeSagc# Make signature
8*6808773aSagcAT_CHECK([netpgp --homedir $testhomedir --sign file3],
9a95ce5aeSagc    [0], [ignore], [ignore])
10a95ce5aeSagc
11a95ce5aeSagc# Verify sig file
12efcb034dSlukemAT_CHECK([netpgp --homedir $testhomedir --cat --output=file3.copy file3.gpg],
1387ffa43dSlukem    [0], [ignore], [ignore])
1487ffa43dSlukemAT_CHECK([diff file3 file3.copy])
15a95ce5aeSagc
16a95ce5aeSagc# Verify sig to stdout
17efcb034dSlukemAT_CHECK([netpgp --homedir $testhomedir --cat file3.gpg],
1887ffa43dSlukem    [0], [stdout], [ignore])
1987ffa43dSlukemAT_CHECK([diff file3 stdout])
20a95ce5aeSagc
21a95ce5aeSagc# XXXTODO: deliberately corrupt file3.gpg and attempt to verify
22a95ce5aeSagc
23a95ce5aeSagcAT_CLEANUP
24