summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.h
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-11-22 15:06:09 +1000
committerDan McGee <dan@archlinux.org>2011-03-23 22:22:33 -0500
commited6fda2f98bdcde56a67e43a6bcf644c549892a2 (patch)
tree1e28badd92918a5a1e53eb48f8b3d0423cd2a484 /lib/libalpm/db.h
parentef26c445245d0d25dfbca8f6feb590d3288d76d4 (diff)
downloadpacman-ed6fda2f98bdcde56a67e43a6bcf644c549892a2.tar.xz
Add functions for verifying database signature
Add a pmpgpsig_t struct to the database entry struct and functions for the lazy loading of database signatures. Add a function for checking database signatures, reusing (and generalizing) the code currently used for checking package signatures. TODO: The code for reading in signature files from the filesystem is duplicated for local packages and database and needs refactoring. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.h')
-rw-r--r--lib/libalpm/db.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index dfd9f933..204a0be0 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -31,6 +31,9 @@
#include <archive.h>
#include <archive_entry.h>
+#include "alpm.h"
+#include "signing.h"
+
/* Database entries */
typedef enum _pmdbinfrq_t {
INFRQ_BASE = 1,
@@ -60,6 +63,8 @@ struct __pmdb_t {
pmpkghash_t *pkgcache;
alpm_list_t *grpcache;
alpm_list_t *servers;
+ /* do not access directly, use _alpm_db_pgpsig(db) for lazy access */
+ pmpgpsig_t pgpsig;
pgp_verify_t pgp_verify;
struct db_operations *ops;
@@ -76,6 +81,7 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles);
pmdb_t *_alpm_db_register_local(void);
pmdb_t *_alpm_db_register_sync(const char *treename);
void _alpm_db_unregister(pmdb_t *db);
+const pmpgpsig_t *_alpm_db_pgpsig(pmdb_t *db);
/* be_*.c, backend specific calls */
int _alpm_local_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);