summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-key
Commit message (Collapse)AuthorAgeFilesLines
* deal with spaces in path, command and filepaths in apt-keyDavid Kalnischkies2015-09-141-7/+8
| | | | | | | | Filenames we get could include spaces, but also the tmpdir we work in and the failures we print in return a very generic and unhelpful… Properly supporting spaces is a bit painful as we constructed gpg command before, which is now moved to (multilevel) calls to temporary scripts instead.
* implement Signed-By without using gpg for verificationDavid Kalnischkies2015-08-101-0/+1
| | | | | | | | | | The previous commit returns to the possibility of using just gpgv for verification proposes. There is one problem through: We can't enforce a specific keyid without using gpg, but our acquire method can as it parses gpgv output anyway, so it can deal with good signatures from not expected signatures and treats them as unknown keys instead. Git-Dch: Ignore
* merge keyrings with cat instead of gpg in apt-keyDavid Kalnischkies2015-08-101-1/+1
| | | | | | | | | | | | | | | | | | | If all keyrings are simple keyrings we can merge the keyrings with cat rather than doing a detour over gpg --export | --import (see #790665), which means 'apt-key verify' can do without gpg and just use gpgv as before the merging change. We declare this gpgv usage explicit now in the dependencies. This isn't a new dependency as gnupg as well as debian-archive-keyring depend on and we used it before unconditionally, just that we didn't declare it. The handling of the merged keyring needs to be slightly different as our merged keyring can end up containing the same key multiple times, but at least currently gpg does remove only the first occurrence with --delete-keys, so we move the handling to a if one is gone, all are gone rather than an (implicit) quid pro quo or even no effect. Thanks: Daniel Kahn Gillmor for the suggestion
* support gpg 2.1.x in apt-keyDavid Kalnischkies2015-08-101-51/+64
| | | | | | | | | | | | | | | | | | The output of gpg slightly changes in 2.1 which breaks the testcase, but the real problem is that this branch introduces a new default keyring format (which is called keybox) and mixing it with simple keyrings (the previous default format) has various problems like failing in the keybox to keyring import (#790665) or [older] gpgv versions not being able to deal with keyboxes (and newer versions as well currently: https://bugs.gnupg.org/gnupg/issue2025). We fix this by being a bit more careful in who creates keyrings (aka: we do it or we take a simple keyring as base) to ensure we always have a keyring instead of a keybox. This way we can ensure that any version combination of gpv/gpgv2 and gnupg/gnupg2 without doing explicit version checks and use the same code for all of them. Closes: 781042
* implement Signed-By option for sources.listDavid Kalnischkies2015-08-101-2/+35
| | | | | | | | | | Limits which key(s) can be used to sign a repository. Not immensely useful from a security perspective all by itself, but if the user has additional measures in place to confine a repository (like pinning) an attacker who gets the key for such a repository is limited to its potential and can't use the key to sign its attacks for an other (maybe less limited) repository… (yes, this is as weak as it sounds, but having the capability might come in handy for implementing other stuff later).
* Merge branch 'debian/jessie' into debian/experimentalDavid Kalnischkies2015-04-191-0/+7
|\ | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc cmdline/apt-key.in methods/https.cc test/integration/test-apt-key test/integration/test-multiarch-foreign
| * keyids in "apt-key del" should be case-insensitiveDavid Kalnischkies2015-04-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | gnupg is case-insensitive about keyids, so back then apt-key called it directly any keyid was accepted, but now that we work more with the keyid ourself we regressed to require uppercase keyids by accident. This is also inconsistent with other apt-key commands which still use gnupg directly. A single case-insensitive grep and we are fine again. Closes: 781696
| * support long keyids in "apt-key del" instead of ignoring themJames McCoy2014-11-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | apt-key given a long keyid reports just "OK" all the time, but doesn't delete the mentioned key as it doesn't find the key. Note: In debian/experimental this was closed with 29f1b977100aeb6d6ebd38923eeb7a623e264ffe which just added the testcase as the rewrite of apt-key had fixed this as well. Closes: 754436
* | test exitcode as well as string equalityDavid Kalnischkies2015-03-161-2/+2
| | | | | | | | | | | | | | | | We use test{success,failure} now all over the place in the framework, so its only consequencial to do this in the situations in which we test for a specific output as well. Git-Dch: Ignore
* | tests: enhance output of grep and test failsDavid Kalnischkies2014-10-261-7/+7
| | | | | | | | Git-Dch: Ignore
* | ensure world-readability for trusted.gpg in postinstDavid Kalnischkies2014-10-021-0/+7
| | | | | | | | | | | | | | | | | | | | apt-key creates trusted.gpg if it needs it with 644 nowadays, but before it ensured this, it was gpg creating it, which gives it by default 600. Not a problem as long as our gpgv is run as root, but now that we drop privileges we have to ensure that we can also read trusted.gpg files created by earlier apt-key versions. Closes: 647001
* | ensure apt-key del handles 16-byte key idsJames McCoy2014-09-271-0/+8
| | | | | | | | | | | | | | The original patch does not apply against the rewritten apt-key, but an additional test doesn't hurt. Closes: 754436
* | use only one --keyring in gpg interactionsDavid Kalnischkies2014-09-271-18/+39
| | | | | | | | | | | | | | | | | | We were down to at most two keyrings before, but gnupg upstream plans dropping support for multiple keyrings in the longrun, so with a single keyring we hope to be future proof – and 'apt-key adv' isn't a problem anymore as every change to the keys is merged back, so we have now the same behavior as before, but support an unlimited amount of trusted.gpg.d keyrings.
* | allow to specify fingerprints in 'apt-key del'David Kalnischkies2014-09-271-0/+8
| |
* | add a test for apt-key export{,all}David Kalnischkies2014-09-271-0/+7
| | | | | | | | Git-Dch: Ignore
* | support gnupg2 as drop-in replacement for gnupgDavid Kalnischkies2014-09-271-83/+108
|/ | | | | | If both are available APT will still prefer gpg over gpg2 as it is a bit more lightweight, but it shouldn't be a problem to use one or the other (at least at the moment, who knows what will happen in the future).
* let apt-key del work better with softlink and single key keyringsDavid Kalnischkies2013-08-121-0/+68
| | | | | | | Having fragement files means there is a good chance that there is one key per keyring, so deal with that as well as with setups in which keyrings are linked into trusted.gpg.d as we can't just modify those files (they might be in /usr for example).
* make the keyring locations in apt-key configurableDavid Kalnischkies2013-08-121-0/+39
Might come in handy for more than just a simple testcase.