summaryrefslogtreecommitdiffstats
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2020-06-09 04:03:18 +0200
committerAndrew Gregory <andrew@archlinux.org>2020-06-18 11:07:35 +0200
commit1e9cd30e488cd133d24eac7ed9cac7806db2c406 (patch)
treec88367f156e1c5135b214e27daf49219ba2e1e33 /scripts/makepkg.sh.in
parent2a345604cd8bd6a8fe5041ea7ec046c8d20aa30b (diff)
downloadpacman-1e9cd30e488cd133d24eac7ed9cac7806db2c406.tar.gz
pacman-1e9cd30e488cd133d24eac7ed9cac7806db2c406.tar.xz
makepkg/repo-add: do not accept public-only keys for signing
If it's not listed by --list-secret-key we don't care if it has been imported into your keyring, it's unusable. And you might not have a private key at all in the no-keyid-specified case. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 02ae97b0da220d9079c6c2c1ac3e3ab0d12c1ac7)
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 703eb52e..c9e381d5 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1284,7 +1284,7 @@ fi
# check if gpg signature is to be created and if signing key is valid
if { [[ -z $SIGNPKG ]] && check_buildenv "sign" "y"; } || [[ $SIGNPKG == 'y' ]]; then
SIGNPKG='y'
- if ! gpg --list-key ${GPGKEY:+"$GPGKEY"} &>/dev/null; then
+ if ! gpg --list-secret-key ${GPGKEY:+"$GPGKEY"} &>/dev/null; then
if [[ ! -z $GPGKEY ]]; then
error "$(gettext "The key %s does not exist in your keyring.")" "${GPGKEY}"
else