]>
git.saurik.com Git - apt.git/blob - test/integration/test-method-gpgv
4 TESTDIR
= " $(readlink -f "$(dirname "$0") " ) "
8 configarchitecture 'i386'
10 cat > faked-apt-key <<EOF
14 find_gpgv_status_fd() {
15 while [ -n " \
$1 " ]; do
16 if [ " \
$1 " = '--status-fd' ]; then
24 GPGSTATUSFD=" \
$(find_gpgv_status_fd "\$@") "
25 cat >&\ ${GPGSTATUSFD} gpgv.output
28 chmod +x faked-apt-key
31 echo " $3 " > gpgv.output
33 gpgvmethod >method.output 2>&1 || true
34 testsuccess --nomsg grep " $2 " method.output
38 testgpgv 'Good signed with long keyid' 'Good: GOODSIG 5A90D141DBAC8DAE,' '[GNUPG:] GOODSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
39 [GNUPG:] VALIDSIG 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE 2016-09-01 1472742625 0 4 0 1 11 00 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE'
40 testgpgv 'Good signed with fingerprint' 'Good: GOODSIG 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE,' '[GNUPG:] GOODSIG 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
41 [GNUPG:] VALIDSIG 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE 2016-09-01 1472742625 0 4 0 1 11 00 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE'
43 testgpgv 'No Pubkey with long keyid' 'NoPubKey: NO_PUBKEY E8525D47528144E2,' '[GNUPG:] ERRSIG E8525D47528144E2 1 11 00 1472744666 9
44 [GNUPG:] NO_PUBKEY E8525D47528144E2'
45 testgpgv 'No Pubkey with fingerprint' 'NoPubKey: NO_PUBKEY DE66AECA9151AFA1877EC31DE8525D47528144E2,' '[GNUPG:] ERRSIG DE66AECA9151AFA1877EC31DE8525D47528144E2 1 11 00 1472744666 9
46 [GNUPG:] NO_PUBKEY DE66AECA9151AFA1877EC31DE8525D47528144E2'
48 testgpgv 'Expired key with long keyid' 'Worthless: EXPKEYSIG 4BC0A39C27CE74F9 Rex Expired <rex@example.org>,' '[GNUPG:] EXPKEYSIG 4BC0A39C27CE74F9 Rex Expired <rex@example.org>
49 [GNUPG:] VALIDSIG 891CC50E605796A0C6E733F74BC0A39C27CE74F9 2016-09-01 1472742629 0 4 0 1 11 00 891CC50E605796A0C6E733F74BC0A39C27CE74F9'
50 testgpgv 'Expired key with fingerprint' 'Worthless: EXPKEYSIG 891CC50E605796A0C6E733F74BC0A39C27CE74F9 Rex Expired <rex@example.org>,' '[GNUPG:] EXPKEYSIG 891CC50E605796A0C6E733F74BC0A39C27CE74F9 Rex Expired <rex@example.org>
51 [GNUPG:] VALIDSIG 891CC50E605796A0C6E733F74BC0A39C27CE74F9 2016-09-01 1472742629 0 4 0 1 11 00 891CC50E605796A0C6E733F74BC0A39C27CE74F9'
55 echo '601 Configuration
56 Config-Item: Debug::Acquire::gpgv=1
57 Config-Item: Dir::Bin::apt-key=./faked-apt-key
62 ' | runapt " ${METHODSDIR} / gpgv
"
67 echo '601 Configuration
68 Config-Item: Debug::Acquire::gpgv=1
69 Config-Item: Dir::Bin::apt-key=./faked-apt-key
74 Signed-By: 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE
75 ' | runapt " ${METHODSDIR} / gpgv
"