summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-03-06 17:53:30 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2012-03-06 17:53:30 +0100
commit6b60ece0fe85ccd70ac6dcb63be7a9f9a4f55c7a (patch)
tree4696bcdde0cd9e6ea7d6c2c390db635a0961b3ea /test
parentd426e829eba77281d59a0e6ddef287b96052d531 (diff)
parentb7a6594d1e5ed199a7a472b78b33e070375d6f92 (diff)
* merged from the debian-sid branch, most notably:
- Correct fi translation for hash sum mismatches (LP: #420403) - remove 'old' InRelease file if we can't get a new one before proceeding with Release.gpg to avoid the false impression of a still trusted repository by a (still present) old InRelease file. Thanks to Simon Ruderich for reporting this issue! (CVE-2012-0214) * apt-pkg/acquire-item.cc: - remove 'old' InRelease file if we can't get a new one before proceeding with Release.gpg to avoid the false impression of a still trusted repository by a (still present) old InRelease file. Thanks to Simon Ruderich for reporting this issue! (CVE-2012-0214) * French: replace "étiquetage" by "épinglage" for "pinning"
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-releasefile-verification29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification
index 8bf02a78f..4f65cfa3b 100755
--- a/test/integration/test-releasefile-verification
+++ b/test/integration/test-releasefile-verification
@@ -153,6 +153,35 @@ runtest() {
installaptold
}
+runtest2() {
+ prepare ${PKGFILE}
+ rm -rf rootdir/var/lib/apt/lists
+ signreleasefiles 'Joe Sixpack'
+ msgtest 'Cold archive signed by' 'Joe Sixpack'
+ aptget update 2>&1 | grep -E '^(W|E): ' > /dev/null && msgfail || msgpass
+
+ # New .deb but now an unsigned archive. For example MITM to circumvent
+ # package verification.
+ prepare ${PKGFILE}-new
+ find aptarchive/ -name InRelease -delete
+ find aptarchive/ -name Release.gpg -delete
+ msgtest 'Warm archive signed by' 'nobody'
+ aptget update 2>&1 | grep -E '^(W|E): ' > /dev/null && msgfail || msgpass
+ testequal "$(cat ${PKGFILE}-new)
+" aptcache show apt
+ failaptnew
+
+ # Unsigned archive from the beginning must also be detected.
+ rm -rf rootdir/var/lib/apt/lists
+ msgtest 'Cold archive signed by' 'nobody'
+ aptget update 2>&1 | grep -E '^(W|E): ' > /dev/null && msgfail || msgpass
+ testequal "$(cat ${PKGFILE}-new)
+" aptcache show apt
+ failaptnew
+}
+runtest2
+
+
DELETEFILE="InRelease"
runtest
DELETEFILE="Release.gpg"