FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 04-10-2011, 11:28 AM
Rémy Oudompheng
 
Default libalpm: add a public function to get signature contents

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
 

Thread Tools




All times are GMT. The time now is 10:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org