diff options
author | Dan McGee <dan@archlinux.org> | 2011-09-19 21:51:30 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-20 10:23:11 -0500 |
commit | 994cb4da4f6bc8efbb6a649cb7d99d95bce5c37a (patch) | |
tree | 9cec25c9312ce01792d259141d786813bf7776da /lib/libalpm/be_package.c | |
parent | a27f993600a518ef6a15bd7fb29575b218b58a0a (diff) | |
download | pacman-994cb4da4f6bc8efbb6a649cb7d99d95bce5c37a.tar.xz |
Allow our PGP helper method to pass back the signature results
This will make its way up the call chain eventually to allow trusting
and importing of keys as necessary.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r-- | lib/libalpm/be_package.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index b6cb8c4e..31a7297d 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -330,13 +330,18 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle, /* even if we don't have a sig, run the check code if level tells us to */ if(has_sig || level & ALPM_SIG_PACKAGE) { const char *sig = syncpkg ? syncpkg->base64_sig : NULL; + alpm_siglist_t *siglist; _alpm_log(handle, ALPM_LOG_DEBUG, "sig data: %s\n", sig ? sig : "<from .sig>"); if(_alpm_check_pgp_helper(handle, pkgfile, sig, level & ALPM_SIG_PACKAGE_OPTIONAL, level & ALPM_SIG_PACKAGE_MARGINAL_OK, - level & ALPM_SIG_PACKAGE_UNKNOWN_OK)) { + level & ALPM_SIG_PACKAGE_UNKNOWN_OK, &siglist)) { handle->pm_errno = ALPM_ERR_PKG_INVALID_SIG; + alpm_siglist_cleanup(siglist); + free(siglist); return -1; } + alpm_siglist_cleanup(siglist); + free(siglist); } return 0; |