summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2018-10-30 18:26:10 +0200
committerTimo Teräs <timo.teras@iki.fi>2018-10-30 18:26:10 +0200
commitf38d1f74af7a5ef0ccee2029be0d8036b9020f1a (patch)
tree3dfe3fe5e58ea50101af3301ac598f3d5d7012fb
parentbeab8545ebb2898a2beb157a4d9424ebddf3e26f (diff)
downloadapk-tools-f38d1f74af7a5ef0ccee2029be0d8036b9020f1a.tar.gz
apk-tools-f38d1f74af7a5ef0ccee2029be0d8036b9020f1a.tar.bz2
apk-tools-f38d1f74af7a5ef0ccee2029be0d8036b9020f1a.tar.xz
apk-tools-f38d1f74af7a5ef0ccee2029be0d8036b9020f1a.zip
fix xattr hash to be sha1
The hash type was accidentally changed in previous commit. Currently csum->data cannot hold longer hash, so fix the hash.
-rw-r--r--src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index 0295807..382fd1b 100644
--- a/src/io.c
+++ b/src/io.c
@@ -632,7 +632,7 @@ void apk_fileinfo_hash_xattr_array(struct apk_xattr_array *xattrs, const EVP_MD
qsort(xattrs->item, xattrs->num, sizeof(xattrs->item[0]), cmp_xattr);
- EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL);
+ EVP_DigestInit_ex(mdctx, EVP_sha1(), NULL);
foreach_array_item(xattr, xattrs) {
hash_len_data(mdctx, strlen(xattr->name), xattr->name);
hash_len_data(mdctx, xattr->value.len, xattr->value.ptr);