X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0b94a7bc2ebb42453d9e22dc58dde76b9261de50..9c4e6026c498078aa223eae95f2c9752cb45525c:/cmdline/apt-key.in?ds=sidebyside diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in index a9a729cce..7a3852ee8 100644 --- a/cmdline/apt-key.in +++ b/cmdline/apt-key.in @@ -384,6 +384,9 @@ if [ "$command" != "help" ]; then # gpg needs (in different versions more or less) files to function correctly, # so we give it its own homedir and generate some valid content for it + if [ ! -d "$TMPDIR" ]; then + unset TMPDIR + fi GPGHOMEDIR="$(mktemp -d)" CURRENTTRAP="${CURRENTTRAP} rm -rf '${GPGHOMEDIR}';" trap "${CURRENTTRAP}" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM @@ -450,6 +453,14 @@ case "$command" in $GPG "$@" merge_back_changes ;; + verify) + setup_merged_keyring + if which gpgv >/dev/null 2>&1; then + gpgv --homedir "${GPGHOMEDIR}" --keyring "${GPGHOMEDIR}/pubring.gpg" --ignore-time-conflict "$@" + else + $GPG --verify "$@" + fi + ;; help) usage ;;