aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/tarball.cc
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2020-06-03 12:38:23 +0200
committerzimbatm <zimbatm@zimbatm.com>2020-06-03 13:49:51 +0200
commit6ee03b8444e1838b9985a9fd4f0f46947e958b3b (patch)
treee40d764bc72255778bf3e9e21355973c619b8dc5 /src/libfetchers/tarball.cc
parent01572c2198de49071827f0be9f5db202bac21703 (diff)
libutils/hash: remove default encoding
This will make it easier to reason about the hash encoding and switch to SRI everywhere where possible.
Diffstat (limited to 'src/libfetchers/tarball.cc')
-rw-r--r--src/libfetchers/tarball.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc
index b6e57379b..1b0eba18a 100644
--- a/src/libfetchers/tarball.cc
+++ b/src/libfetchers/tarball.cc
@@ -196,9 +196,9 @@ struct TarballInput : Input
// NAR hashes are preferred over file hashes since tar/zip files
// don't have a canonical representation.
if (narHash)
- url2.query.insert_or_assign("narHash", narHash->to_string(SRI));
+ url2.query.insert_or_assign("narHash", narHash->to_string(SRI, true));
else if (hash)
- url2.query.insert_or_assign("hash", hash->to_string(SRI));
+ url2.query.insert_or_assign("hash", hash->to_string(SRI, true));
return url2;
}
@@ -207,7 +207,7 @@ struct TarballInput : Input
Attrs attrs;
attrs.emplace("url", url.to_string());
if (hash)
- attrs.emplace("hash", hash->to_string(SRI));
+ attrs.emplace("hash", hash->to_string(SRI, true));
return attrs;
}