1 # $NetBSD: crypt.at,v 1.5 2009/06/11 02:36:38 lukem Exp $
3 AT_SETUP([encryption and decryption])
5 AT_CHECK([cp ${TOPSRCDIR}/configure file1], [0], [ignore], [ignore])
8 AT_CHECK([netpgp --homedir $testhomedir --encrypt file1],
9 [0], [ignore], [ignore])
11 # Decrypt the encrypted file
12 AT_CHECK([netpgp --homedir $testhomedir --decrypt file1.gpg],
13 [0], [ignore], [ignore])
15 # Decrypt and send to a different file
16 AT_CHECK([netpgp --homedir $testhomedir --decrypt --output=file1.copy file1.gpg],
17 [0], [ignore], [ignore])
18 AT_CHECK([diff file1 file1.copy])
20 # deliberately corrupt file1.gpg and attempt to decrypt
21 #sed -e 's|1|2|' file1.gpg > file2.gpg
22 #AT_CHECK([netpgp --homedir $testhomedir --decrypt file2.gpg],
24 #[netpgp: default key set to "C7AB5F325F918728"
25 #/usr/src/crypto/external/bsd/netpgp-hack/lib/../dist/src/lib/reader.c:1614: Unknown, Bad hash in MDC packet