summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-update-nofallback
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/test-apt-update-nofallback')
-rwxr-xr-xtest/integration/test-apt-update-nofallback23
1 files changed, 10 insertions, 13 deletions
diff --git a/test/integration/test-apt-update-nofallback b/test/integration/test-apt-update-nofallback
index d9166eefd..c8a008214 100755
--- a/test/integration/test-apt-update-nofallback
+++ b/test/integration/test-apt-update-nofallback
@@ -9,8 +9,7 @@ set -e
simulate_mitm_and_inject_evil_package()
{
redatereleasefiles '+1 hour'
- rm -f "$APTARCHIVE/dists/unstable/InRelease"
- rm -f "$APTARCHIVE/dists/unstable/Release.gpg"
+ rm -f "$APTARCHIVE/dists/unstable/InRelease" "$APTARCHIVE/dists/unstable/Release.gpg"
inject_evil_package
}
@@ -59,7 +58,7 @@ setupaptarchive_with_lists_clean()
test_from_inrelease_to_unsigned()
{
- # setup archive with InRelease file
+ export APT_DONT_SIGN='Release.gpg'
setupaptarchive_with_lists_clean
testsuccess aptget update
listcurrentlistsdirectory > lists.before
@@ -71,9 +70,8 @@ test_from_inrelease_to_unsigned()
test_from_release_gpg_to_unsigned()
{
- # setup archive with Release/Release.gpg (but no InRelease)
+ export APT_DONT_SIGN='InRelease'
setupaptarchive_with_lists_clean
- rm "$APTARCHIVE/dists/unstable/InRelease"
testsuccess aptget update
listcurrentlistsdirectory > lists.before
@@ -84,6 +82,7 @@ test_from_release_gpg_to_unsigned()
test_from_inrelease_to_unsigned_with_override()
{
+ export APT_DONT_SIGN='Release.gpg'
# setup archive with InRelease file
setupaptarchive_with_lists_clean
testsuccess aptget update
@@ -120,17 +119,16 @@ test_cve_2012_0214()
#
# Still worth having a regression test the simulates the condition
- # setup archive with InRelease
+ export APT_DONT_SIGN='Release.gpg'
setupaptarchive_with_lists_clean
testsuccess aptget update
listcurrentlistsdirectory > lists.before
# do what CVE-2012-0214 did
- rm "$APTARCHIVE/dists/unstable/InRelease"
- rm "$APTARCHIVE/dists/unstable/Release.gpg"
+ rm -f "$APTARCHIVE/dists/unstable/InRelease" "$APTARCHIVE/dists/unstable/Release.gpg"
inject_evil_package
# build valid Release file
- aptftparchive -qq release ./aptarchive > aptarchive/dists/unstable/Release
+ aptftparchive -qq release ./aptarchive > aptarchive/dists/unstable/Release
assert_update_is_refused_and_last_good_state_used
testfileequal lists.before "$(listcurrentlistsdirectory)"
@@ -141,7 +139,7 @@ test_cve_2012_0214()
test_subvert_inrelease()
{
- # setup archive with InRelease
+ export APT_DONT_SIGN='Release.gpg'
setupaptarchive_with_lists_clean
testsuccess aptget update
listcurrentlistsdirectory > lists.before
@@ -159,7 +157,7 @@ E: Some index files failed to download. They have been ignored, or old ones used
test_inrelease_to_invalid_inrelease()
{
- # setup archive with InRelease
+ export APT_DONT_SIGN='Release.gpg'
setupaptarchive_with_lists_clean
testsuccess aptget update
listcurrentlistsdirectory > lists.before
@@ -180,9 +178,8 @@ W: Some index files failed to download. They have been ignored, or old ones used
test_release_gpg_to_invalid_release_release_gpg()
{
- # setup archive with InRelease
+ export APT_DONT_SIGN='InRelease'
setupaptarchive_with_lists_clean
- rm "$APTARCHIVE/dists/unstable/InRelease"
testsuccess aptget update
listcurrentlistsdirectory > lists.before