summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README3
-rw-r--r--lib/libalpm/alpm.h6
-rw-r--r--lib/libalpm/package.c7
-rw-r--r--src/pacman/package.c1
4 files changed, 16 insertions, 1 deletions
diff --git a/README b/README
index 2c91978c..3fff658a 100644
--- a/README
+++ b/README
@@ -428,7 +428,8 @@ API CHANGES BETWEEN 3.5 AND 4.0
- package signing functions:
alpm_option_get_default_siglevel(), alpm_option_set_default_siglevel(),
alpm_option_get_gpgdir(), alpm_option_set_gpgdir(), alpm_db_get_siglevel(),
- alpm_sigresult_cleanup(), alpm_db_check_pgp_signature(), alpm_pkg_check_pgp_signature()
+ alpm_sigresult_cleanup(), alpm_db_check_pgp_signature(), alpm_pkg_check_pgp_signature(),
+ alpm_pkg_get_base64_sig()
- list functions:
alpm_list_to_array(), alpm_list_previous()
- structs:
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 6ed82e40..3bbef0ab 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -713,6 +713,12 @@ alpm_list_t *alpm_pkg_get_backup(alpm_pkg_t *pkg);
*/
alpm_db_t *alpm_pkg_get_db(alpm_pkg_t *pkg);
+/** Retuns the base64 encoded package signature.
+ * @param pkg a pointer to package
+ * @return a reference to an internal string
+ */
+const char *alpm_pkg_get_base64_sig(alpm_pkg_t *pkg);
+
/* End of alpm_pkg_t accessors */
/* @} */
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 947f62e0..e5136c77 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -229,6 +229,13 @@ const char SYMEXPORT *alpm_pkg_get_md5sum(alpm_pkg_t *pkg)
return pkg->ops->get_md5sum(pkg);
}
+const char SYMEXPORT *alpm_pkg_get_base64_sig(alpm_pkg_t *pkg)
+{
+ ASSERT(pkg != NULL, return NULL);
+ pkg->handle->pm_errno = 0;
+ return pkg->base64_sig;
+}
+
const char SYMEXPORT *alpm_pkg_get_arch(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);
diff --git a/src/pacman/package.c b/src/pacman/package.c
index 45afded2..27b691e2 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -135,6 +135,7 @@ void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra)
if(from == PKG_FROM_SYNCDB) {
string_display(_("MD5 Sum :"), alpm_pkg_get_md5sum(pkg));
+ string_display(_("Signatures :"), alpm_pkg_get_base64_sig(pkg) ? _("Yes") : _("No"));
}
if(from == PKG_FROM_FILE) {
alpm_sigresult_t result;