makepkg: show full fingerprint on pgp failure
Rather than implementing suffix matching, which might clash, let's just print the full fingerprint of the err'ing key so that the user can copy/paste it into validpgpkeys. Also, make it clear in the manpage that validpgpkeys needs full fingerprints, and nothing else. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
926d998a75
commit
3f0303dc92
|
@ -138,7 +138,8 @@ the integrity of the corresponding source file.
|
||||||
trust values from the keyring. If the source file was signed with a
|
trust values from the keyring. If the source file was signed with a
|
||||||
subkey, makepkg will still use the primary key for comparison.
|
subkey, makepkg will still use the primary key for comparison.
|
||||||
+
|
+
|
||||||
Fingerprints must be uppercase and must not contain whitespace characters.
|
Only full fingerprints are accepted. They must be uppercase and must not
|
||||||
|
contain whitespace characters.
|
||||||
|
|
||||||
*noextract (array)*::
|
*noextract (array)*::
|
||||||
An array of file names corresponding to those from the source array. Files
|
An array of file names corresponding to those from the source array. Files
|
||||||
|
|
|
@ -1494,10 +1494,10 @@ check_pgpsigs() {
|
||||||
errors=1
|
errors=1
|
||||||
else
|
else
|
||||||
if (( ${#validpgpkeys[@]} == 0 && ! $trusted )); then
|
if (( ${#validpgpkeys[@]} == 0 && ! $trusted )); then
|
||||||
printf "%s ($(gettext "the public key %s is not trusted"))" $(gettext "FAILED") "$pubkey" >&2
|
printf "%s ($(gettext "the public key %s is not trusted"))" $(gettext "FAILED") "$fingerprint" >&2
|
||||||
errors=1
|
errors=1
|
||||||
elif (( ${#validpgpkeys[@]} > 0 )) && ! in_array "$fingerprint" "${validpgpkeys[@]}"; then
|
elif (( ${#validpgpkeys[@]} > 0 )) && ! in_array "$fingerprint" "${validpgpkeys[@]}"; then
|
||||||
printf "%s (%s $pubkey)" "$(gettext "FAILED")" "$(gettext "invalid public key")"
|
printf "%s (%s %s)" "$(gettext "FAILED")" "$(gettext "invalid public key")" "$fingerprint"
|
||||||
errors=1
|
errors=1
|
||||||
else
|
else
|
||||||
printf '%s' "$(gettext "Passed")" >&2
|
printf '%s' "$(gettext "Passed")" >&2
|
||||||
|
|
Loading…
Reference in New Issue