summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-12 03:16:42 +0200
committerDan McGee <dan@archlinux.org>2011-08-15 19:13:35 +0200
commitbd5ec9cd8e23bba4334a7b3a5a73843c3667c085 (patch)
tree76e6018d88a861a5cc16729d8274b3ceab7e3ccb /lib/libalpm/sync.c
parentf37c5016572fecb16cc53d5e3fdd059944e36359 (diff)
downloadpacman-bd5ec9cd8e23bba4334a7b3a5a73843c3667c085.tar.gz
pacman-bd5ec9cd8e23bba4334a7b3a5a73843c3667c085.tar.xz
Validate the sha256sum if available
Adjust load_internal() to check the sha256sum value if we have it. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 5ef1e048..f16489d9 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -721,7 +721,7 @@ static int validate_deltas(alpm_handle_t *handle, alpm_list_t *deltas,
alpm_delta_t *d = alpm_list_getdata(i);
char *filepath = _alpm_filecache_find(handle, d->delta);
- ret = _alpm_test_md5sum(filepath, d->delta_md5);
+ ret = _alpm_test_checksum(filepath, d->delta_md5, ALPM_CSUM_MD5);
if(ret != 0) {
prompt_to_delete(trans, filepath, ALPM_ERR_DLT_INVALID);
errors++;
@@ -909,7 +909,7 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
"replacing pkgcache entry with package file for target %s\n",
spkg->name);
alpm_pkg_t *pkgfile =_alpm_pkg_load_internal(handle, filepath, 1, spkg->md5sum,
- spkg->base64_sig, level);
+ spkg->sha256sum, spkg->base64_sig, level);
if(!pkgfile) {
prompt_to_delete(trans, filepath, handle->pm_errno);
errors++;