Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/pacman-key.sh.in20
1 files changed, 14 insertions, 6 deletions
diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
index 82131e91..0c4d3aef 100644
--- a/scripts/pacman-key.sh.in
+++ b/scripts/pacman-key.sh.in
@@ -202,16 +202,24 @@ verify_keyring_input() {
# Verify signatures of keyring files and association revocation files if they exist
msg "$(gettext "Verifying keyring file signatures...")"
- local keyring
+ local keyring keyfile
for keyring in "${KEYRINGIDS[@]}"; do
- if ! "${GPG_PACMAN[@]}" --verify "${KEYRING_IMPORT_DIR}/${keyring}.gpg.sig" &>/dev/null; then
- error "$(gettext "The signature of file %s is not valid.")" "${keyring}.gpg"
+ keyfile="${KEYRING_IMPORT_DIR}/${keyring}.gpg"
+ if [[ ! -f "${keyfile}.sig" ]]; then
+ error "$(gettext "File %s is unsigned, cannot continue.")" "${keyfile}"
+ ret=1
+ elif ! "${GPG_PACMAN[@]}" --verify "${keyfile}.sig" &>/dev/null; then
+ error "$(gettext "The signature of file %s is not valid.")" "${keyfile}"
ret=1
fi
- if [[ -f "${KEYRING_IMPORT_DIR}/${keyring}-revoked" ]]; then
- if ! "${GPG_PACMAN[@]}" --verify "${KEYRING_IMPORT_DIR}/${keyring}-revoked.sig" &>/dev/null; then
- error "$(gettext "The signature of file %s is not valid.")" "${keyring}-revoked"
+ keyfile="${KEYRING_IMPORT_DIR}/${keyring}-revoked"
+ if [[ -f "${keyfile}" ]]; then
+ if [[ ! -f "${keyfile}.sig" ]]; then
+ error "$(gettext "File %s is unsigned, cannot continue.")" "${keyfile}"
+ ret=1
+ elif ! "${GPG_PACMAN[@]}" --verify "${keyfile}.sig" &>/dev/null; then
+ error "$(gettext "The signature of file %s is not valid.")" "${keyfile}"
ret=1
fi
fi