summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2013-10-15 16:21:33 +1000
committerAllan McRae <allan@archlinux.org>2013-10-31 16:20:02 +1000
commit70b2c5f5ef7e81f61db9fada63c80514c3b163a5 (patch)
tree623865e69f51aed787a011d37c4742367596a121
parentc7f159c1c94517a92c3a66208e534e1a983dddef (diff)
List signiture keyids in -Sii output
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--src/pacman/package.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index eab28731..349946fb 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -190,10 +190,21 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra)
}
if(from == ALPM_PKG_FROM_SYNCDB && extra) {
+ const char *base64_sig = alpm_pkg_get_base64_sig(pkg);
+ alpm_list_t *keys = NULL;
+ if(base64_sig) {
+ unsigned char *decoded_sigdata = NULL;
+ size_t data_len;
+ alpm_decode_signature(base64_sig, &decoded_sigdata, &data_len);
+ alpm_extract_keyid(config->handle, alpm_pkg_get_name(pkg),
+ decoded_sigdata, data_len, &keys);
+ } else {
+ keys = alpm_list_add(keys, _("None"));
+ }
+
string_display(_("MD5 Sum :"), alpm_pkg_get_md5sum(pkg), cols);
string_display(_("SHA256 Sum :"), alpm_pkg_get_sha256sum(pkg), cols);
- string_display(_("Signatures :"),
- alpm_pkg_get_base64_sig(pkg) ? _("Yes") : _("None"), cols);
+ list_display(_("Signatures :"), keys, cols);
} else {
list_display(_("Validated By :"), validation, cols);
}