]>
git.saurik.com Git - apt.git/blob - test/integration/test-releasefile-date-older
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture 'i386'
9 insertpackage 'wheezy' 'apt' 'all' '0.8.15'
11 setupaptarchive --no-update
13 # we don't complain as the server could have just sent a 'Hit' here and this
14 # 'downgrade attack' is usually performed by out-of-sync mirrors. Valid-Until
15 # catches the 'real' downgrade attacks (expect that it finds stale mirrors).
16 # Scaring users with an error here serves hence no point.
18 msgmsg 'InRelease file is silently rejected if' 'new Date is before old Date'
19 rm -rf rootdir/var/lib/apt/lists
20 generatereleasefiles 'now' 'now + 7 days'
22 testsuccess aptget update
23 listcurrentlistsdirectory > listsdir.lst
24 redatereleasefiles 'now - 2 days'
25 testsuccess aptget update
26 testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
28 msgmsg 'Release.gpg file is silently rejected if' 'new Date is before old Date'
29 rm -rf rootdir/var/lib/apt/lists
30 generatereleasefiles 'now' 'now + 7 days'
32 find aptarchive -name 'InRelease' -delete
33 testsuccess aptget update
34 listcurrentlistsdirectory > listsdir.lst
35 redatereleasefiles 'now - 2 days'
36 find aptarchive -name 'InRelease' -delete
37 testsuccess aptget update
38 testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
40 msgmsg 'Crisscross InRelease/Release.gpg file is silently rejected if' 'new Date is before old Date'
41 rm -rf rootdir/var/lib/apt/lists
42 generatereleasefiles 'now' 'now + 7 days'
44 find aptarchive -name 'Release.gpg' -delete
45 testsuccess aptget update
46 listcurrentlistsdirectory > listsdir.lst
47 redatereleasefiles 'now - 2 days'
48 find aptarchive -name 'InRelease' -delete
49 testsuccess aptget update
50 testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
52 msgmsg 'Crisscross Release.gpg/InRelease file is silently rejected if' 'new Date is before old Date'
53 rm -rf rootdir/var/lib/apt/lists
54 generatereleasefiles 'now' 'now + 7 days'
56 find aptarchive -name 'InRelease' -delete
57 testsuccess aptget update
58 listcurrentlistsdirectory > listsdir.lst
59 redatereleasefiles 'now - 2 days'
60 find aptarchive -name 'Release.gpg' -delete
61 testsuccess aptget update
62 testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"