summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-30 19:16:37 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-30 19:16:37 +0000
commitfe43d8ab1d8aab0f0fba0a1ea6c0bf96c358478f (patch)
tree487c8ac97cae9666ac0a8657d274f51d4f4475a5 /src/database.c
parentb3596ff2470aae78c6953475a8b4751885cd0bd1 (diff)
downloadapk-tools-fe43d8ab1d8aab0f0fba0a1ea6c0bf96c358478f.tar.gz
apk-tools-fe43d8ab1d8aab0f0fba0a1ea6c0bf96c358478f.tar.bz2
apk-tools-fe43d8ab1d8aab0f0fba0a1ea6c0bf96c358478f.tar.xz
apk-tools-fe43d8ab1d8aab0f0fba0a1ea6c0bf96c358478f.zip
db: allow update of untrusted index
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 16ae94b..15e4730 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1182,7 +1182,8 @@ int apk_repository_update(struct apk_database *db, struct apk_repository *repo)
return 0;
r = apk_cache_download(db, &repo->csum, repo->url, apkindex_tar_gz,
- APK_SIGN_VERIFY);
+ (apk_flags & APK_ALLOW_UNTRUSTED) ?
+ APK_SIGN_NONE : APK_SIGN_VERIFY);
if (r == 0 || r == -ENOKEY || r == -EKEYREJECTED) {
if (r == -ENOKEY)
apk_error("%s: verify: UNTRUSTED", repo->url);