summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-03-25 21:40:16 -0400
committerDan McGee <dan@archlinux.org>2011-04-20 19:42:01 -0500
commit6760ec2b770e65f2aae9cfd39135cefd49961195 (patch)
tree1cff3dd732c5a4e6a7c262c8163e32e52eb7f6d5 /src
parent2c8c763723b43ddcb865aab325afc9c76907cb64 (diff)
downloadpacman-6760ec2b770e65f2aae9cfd39135cefd49961195.tar.xz
Allow VerifySig to act as a default verification in [options]
* add _alpm_db_get_sigverify_level * add alpm_option_{get,set}_default_sigverify And set the default verification level to OPTIONAL if not set otherwise. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index c8e3cb5f..4c43c36a 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -1057,6 +1057,18 @@ static int _parse_options(const char *key, char *value,
pm_printf(PM_LOG_DEBUG, "config: xfercommand: %s\n", value);
} else if (strcmp(key, "CleanMethod") == 0) {
setrepeatingoption(value, "CleanMethod", option_add_cleanmethod);
+ } else if(strcmp(key, "VerifySig") == 0) {
+ if (strcmp(value, "Always") == 0) {
+ alpm_option_set_default_sigverify(PM_PGP_VERIFY_ALWAYS);
+ } else if(strcmp(value, "Optional") == 0) {
+ alpm_option_set_default_sigverify(PM_PGP_VERIFY_OPTIONAL);
+ } else if(strcmp(value, "Never") == 0) {
+ alpm_option_set_default_sigverify(PM_PGP_VERIFY_NEVER);
+ } else {
+ pm_printf(PM_LOG_ERROR, _("invalid value for 'VerifySig' : '%s'\n"), value);
+ return 1;
+ }
+ pm_printf(PM_LOG_DEBUG, "config: setting default VerifySig: %s\n", value);
} else {
pm_printf(PM_LOG_WARNING,