From 4d63ebe2fbe932412a7b8340af49bf30c8e17a91 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 21 Apr 2011 23:39:01 -0500 Subject: Perform package verification at package load time Both md5sum verification and PGP verification can and should be done at package load time. This allows verification to happen as early as possible for packages provided by filename and loaded in the frontend, and moves more stuff out of sync_commit that doesn't really belong there. This should also set the stage for simplified parallel loading of packages later down the road. Signed-off-by: Dan McGee --- lib/libalpm/package.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libalpm/package.h') diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h index 390dcd95..debb239c 100644 --- a/lib/libalpm/package.h +++ b/lib/libalpm/package.h @@ -139,6 +139,10 @@ pmpkg_t* _alpm_pkg_new(void); pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg); void _alpm_pkg_free(pmpkg_t *pkg); void _alpm_pkg_free_trans(pmpkg_t *pkg); + +pmpkg_t *_alpm_pkg_load_internal(const char *filename, int full, + const char *md5sum, const char *base64_sig, pgp_verify_t check_sig); + int _alpm_pkg_cmp(const void *p1, const void *p2); int _alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg); pmpkg_t *_alpm_pkg_find(alpm_list_t *haystack, const char *needle); -- cgit v1.2.3-24-g4f1b