projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* merged the apt--DoListUpdate branch, this provides a common interface
[apt.git]
/
cmdline
/
apt-key
diff --git
a/cmdline/apt-key
b/cmdline/apt-key
index be2b19a1af87a79fc42030259b3f2e7b8e6eb592..d9739461c3246861ab7e988229755455fb50ab47 100755
(executable)
--- a/
cmdline/apt-key
+++ b/
cmdline/apt-key
@@
-5,7
+5,7
@@
set -e
# We don't use a secret keyring, of course, but gpg panics and
# implodes if there isn't one available
# We don't use a secret keyring, of course, but gpg panics and
# implodes if there isn't one available
-GPG_CMD="gpg --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg"
+GPG_CMD="gpg --
ignore-time-conflict --
no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg"
GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg"
GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg"
@@
-21,12
+21,12
@@
update() {
fi
# add new keys
fi
# add new keys
- $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --i
gnore-time-conflict --i
mport
+ $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
# remove no-longer used keys
# remove no-longer used keys
- keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys
|awk '/^pub/{FS=":";print $5}'
`
+ keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys
| grep ^pub | cut -d: -f5
`
for key in $keys; do
for key in $keys; do
- if $GPG --list-keys --with-colons |
awk '/^pub/{FS=":";print $5}'|
grep -q $key; then
+ if $GPG --list-keys --with-colons |
grep ^pub | cut -d: -f5 |
grep -q $key; then
$GPG --quiet --batch --delete-key --yes ${key}
fi
done
$GPG --quiet --batch --delete-key --yes ${key}
fi
done
@@
-39,6
+39,8
@@
usage() {
echo
echo " apt-key add <file> - add the key contained in <file> ('-' for stdin)"
echo " apt-key del <keyid> - remove the key <keyid>"
echo
echo " apt-key add <file> - add the key contained in <file> ('-' for stdin)"
echo " apt-key del <keyid> - remove the key <keyid>"
+ echo " apt-key export <keyid> - output the key <keyid>"
+ echo " apt-key exportall - output all trusted keys"
echo " apt-key update - update keys using the keyring package"
echo " apt-key list - list keys"
echo
echo " apt-key update - update keys using the keyring package"
echo " apt-key list - list keys"
echo
@@
-75,6
+77,12
@@
case "$command" in
finger*)
$GPG --batch --fingerprint
;;
finger*)
$GPG --batch --fingerprint
;;
+ export)
+ $GPG --armor --export "$1"
+ ;;
+ exportall)
+ $GPG --armor --export
+ ;;
adv*)
echo "Executing: $GPG $*"
$GPG $*
adv*)
echo "Executing: $GPG $*"
$GPG $*