1# $NetBSD: userid.at,v 1.1 2009/06/13 05:25:09 agc Exp $ 2 3AT_SETUP([tests with no default userid in gpg.conf]) 4 5# Remove any previous testsuite run's $testhomedir 6AT_CHECK([rm -rf $testhomedir], [0], [ignore], [ignore]) 7 8# Create $testhomedir as fake $HOME/.gnupg 9AT_CHECK([mkdir -m 700 -p $testhomedir], [0], [ignore], [ignore]) 10 11# Import private key for tests 12# XXX: Use GPG until NetPGP's key management is overhauled 13AT_CHECK([gpg --batch --homedir $testhomedir --import < $testprivatekey], 14 [0], [ignore], [ignore]) 15 16AT_CHECK([cp $abs_top_builddir/libtool file3], [0], [ignore], [ignore]) 17 18# sign with an explicit userid, no default in gpg.conf 19AT_CHECK([netpgp --homedir $testhomedir --userid $testuserid --sign file3], 20 [0], [ignore], [ignore]) 21 22# test with no userid 23AT_CHECK([netpgp --homedir $testhomedir --cat --output=file3.copy file3.gpg], 24 [0], [ignore], [ignore]) 25 26AT_CHECK([diff file3 file3.copy]) 27 28# Create a gpg.conf 29#AT_CHECK([echo "default-key $testuserid" > $testhomedir/gpg.conf], 30# [0], [ignore], [ignore]) 31 32AT_CLEANUP 33