summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-update-nofallback
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2015-08-18 11:57:35 +0200
committerMichael Vogt <mvo@debian.org>2015-08-18 11:57:35 +0200
commitb53c9cea2902572822bbbece5bac236c1bbf846e (patch)
tree6c6b0524e0971c0623ccbff71383523ee0b2a5cc /test/integration/test-apt-update-nofallback
parent21248c0f00ee71412dbadc6ebf84011cf974346d (diff)
parent2a22cd60f04c4291ea9b9b72e15b6d2ec378b001 (diff)
Merge remote-tracking branch 'upstream/debian/experimental' into feature/srv-records
Diffstat (limited to 'test/integration/test-apt-update-nofallback')
-rwxr-xr-xtest/integration/test-apt-update-nofallback28
1 files changed, 12 insertions, 16 deletions
diff --git a/test/integration/test-apt-update-nofallback b/test/integration/test-apt-update-nofallback
index db4430ea3..6e9db2cae 100755
--- a/test/integration/test-apt-update-nofallback
+++ b/test/integration/test-apt-update-nofallback
@@ -28,11 +28,12 @@ Description: an autogenerated evil package
EOF
# avoid ims hit
touch -d '+1hour' aptarchive/dists/unstable/main/binary-i386/Packages
+ compressfile aptarchive/dists/unstable/main/binary-i386/Packages
}
assert_update_is_refused_and_last_good_state_used()
{
- testfailuremsg "E: The repository 'file: unstable Release' is no longer signed." aptget update
+ testfailuremsg "E: The repository 'file:${APTARCHIVE} unstable Release' is no longer signed." aptget update
assert_repo_is_intact
}
@@ -87,20 +88,20 @@ test_from_inrelease_to_unsigned_with_override()
{
# setup archive with InRelease file
setupaptarchive_with_lists_clean
- # FIXME: is not what the server reported 4104 4106
- testsuccess aptget update #-o Debug::pkgAcquire::Worker=1
+ testsuccess aptget update
# simulate moving to a unsigned but otherwise valid repo
simulate_mitm_and_inject_evil_package
- generatereleasefiles
+ generatereleasefiles '+2 hours'
+ find $APTARCHIVE -name '*Packages*' -exec touch -d '+2 hours' {} \;
# and ensure we can update to it (with enough force)
testwarning aptget update --allow-insecure-repositories \
- -o Acquire::AllowDowngradeToInsecureRepositories=1
+ -o Acquire::AllowDowngradeToInsecureRepositories=1 -o Debug::pkgAcquire::Worker=1 -o Debug::pkgAcquire::Auth=1
# but that the individual packages are still considered untrusted
testfailureequal "WARNING: The following packages cannot be authenticated!
evil
-E: There are problems and -y was used without --force-yes" aptget install -qq -y evil
+E: There were unauthenticated packages and -y was used without --allow-unauthenticated" aptget install -qq -y evil
}
test_cve_2012_0214()
@@ -150,9 +151,8 @@ test_subvert_inrelease()
# replace InRelease with something else
mv $APTARCHIVE/dists/unstable/Release $APTARCHIVE/dists/unstable/InRelease
- testfailureequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease Does not start with a cleartext signature
-
-E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
+ testfailuremsg "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
+E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
# ensure we keep the repo
testfileequal lists.before "$(listcurrentlistsdirectory)"
@@ -167,13 +167,11 @@ test_inrelease_to_invalid_inrelease()
listcurrentlistsdirectory > lists.before
# now remove InRelease and subvert Release do no longer verify
- sed -i 's/Codename.*/Codename: evil!'/ $APTARCHIVE/dists/unstable/InRelease
+ sed -i 's/^Codename:.*/Codename: evil!/' $APTARCHIVE/dists/unstable/InRelease
inject_evil_package
- testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
+ testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file:${APTARCHIVE} unstable InRelease: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
# ensure we keep the repo
@@ -194,10 +192,8 @@ test_release_gpg_to_invalid_release_release_gpg()
echo "Some evil data" >> $APTARCHIVE/dists/unstable/Release
inject_evil_package
- testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable Release: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
+ testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file:${APTARCHIVE} unstable Release: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
W: Failed to fetch file:${APTARCHIVE}/dists/unstable/Release.gpg The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
testfailure grep 'evil' rootdir/var/lib/apt/lists/*Release