summaryrefslogtreecommitdiffstats
path: root/src/pacman/upgrade.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-27 23:29:49 +0200
committerDan McGee <dan@archlinux.org>2011-07-05 17:13:20 +0200
commit7af0ab1cde9398c938a7a221aca5787934a16121 (patch)
tree5c4327bd4c425c05514bd350d5fdda02b361e936 /src/pacman/upgrade.c
parent1ce7f39ad73c5c96870c6036014afad3d49a8edf (diff)
downloadpacman-7af0ab1cde9398c938a7a221aca5787934a16121.tar.gz
pacman-7af0ab1cde9398c938a7a221aca5787934a16121.tar.xz
signing: move to new signing verification and return scheme
This gives us more granularity than the former Never/Optional/Always trifecta. The frontend still uses these values temporarily but that will be changed in a future patch. * Use 'siglevel' consistenly in method names, 'level' as variable name * The level becomes an enum bitmask value for flexibility * Signature check methods now return a array of status codes rather than a simple integer success/failure value. This allows callers to determine whether things such as an unknown signature are valid. * Specific signature error codes mostly disappear in favor of the above returned status code; pm_errno is now set only to PKG_INVALID_SIG or DB_INVALID_SIG as appropriate. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/upgrade.c')
-rw-r--r--src/pacman/upgrade.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index 95b17cc1..11d00e73 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -42,7 +42,7 @@
int pacman_upgrade(alpm_list_t *targets)
{
alpm_list_t *i, *data = NULL;
- pgp_verify_t check_sig = alpm_option_get_default_sigverify(config->handle);
+ alpm_siglevel_t level = alpm_option_get_default_siglevel(config->handle);
int retval = 0;
if(targets == NULL) {
@@ -76,7 +76,7 @@ int pacman_upgrade(alpm_list_t *targets)
char *targ = alpm_list_getdata(i);
alpm_pkg_t *pkg;
- if(alpm_pkg_load(config->handle, targ, 1, check_sig, &pkg) != 0) {
+ if(alpm_pkg_load(config->handle, targ, 1, level, &pkg) != 0) {
pm_fprintf(stderr, ALPM_LOG_ERROR, "'%s': %s\n",
targ, alpm_strerror(alpm_errno(config->handle)));
trans_release();