We currently don't have a way to retrieve the signature of a package outside of libalpm. Currnetly the public API allows to retrieve the pmpgpsig_t structure but cannot do anything with it. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> --- lib/libalpm/alpm.h | 1 + lib/libalpm/signing.c | 6 ++++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index e837cbb..11b581c 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -563,6 +563,7 @@ alpm_list_t *alpm_pkg_unused_deltas(pmpkg_t *pkg); int alpm_pkg_check_pgp_signature(pmpkg_t *pkg); int alpm_db_check_pgp_signature(pmdb_t *db); +const char *alpm_pgpsig_get_raw(const pmpgpsig_t *sig, size_t *len); /* GPG signature verification option */ typedef enum _pgp_verify_t { diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c index c30650b..cc4b89f 100644 --- a/lib/libalpm/signing.c +++ b/lib/libalpm/signing.c @@ -276,5 +276,11 @@ int SYMEXPORT alpm_db_check_pgp_signature(pmdb_t *db) _alpm_db_pgpsig(db)); } +const char SYMEXPORT *alpm_pgpsig_get_raw(const pmpgpsig_t *sig, size_t *length) +{ + ASSERT(sig != NULL, return(NULL)); + *length = sig->rawlen; + return sig->rawdata; +} /* vim: set ts=2 sw=2 noet: */ -- 1.7.4.4