From afdbfc05f771f2c684ee195b46d26b3d08a67085 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 19 Sep 2011 20:40:32 -0500 Subject: Extract an _alpm_pkg_validate_internal() method _alpm_pkg_load_internal() was becoming a monster. Extract the top bit of the method that dealt with checksum and signature validation into a separate method that should be called before one loads a package to ensure it is valid. Signed-off-by: Dan McGee --- lib/libalpm/package.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/package.h') diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h index c19625c1..fbae766c 100644 --- a/lib/libalpm/package.h +++ b/lib/libalpm/package.h @@ -135,8 +135,10 @@ void _alpm_pkg_free(alpm_pkg_t *pkg); void _alpm_pkg_free_trans(alpm_pkg_t *pkg); -alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile, - alpm_pkg_t *syncpkg, int full, alpm_siglevel_t level); +int _alpm_pkg_validate_internal(alpm_handle_t *handle, + const char *pkgfile, alpm_pkg_t *syncpkg, alpm_siglevel_t level); +alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, + const char *pkgfile, int full); int _alpm_pkg_cmp(const void *p1, const void *p2); int _alpm_pkg_compare_versions(alpm_pkg_t *local_pkg, alpm_pkg_t *pkg); -- cgit v1.2.3-24-g4f1b