aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2022-03-24 14:00:02 +0100
committerLinus Nordberg <linus@nordberg.se>2022-03-24 14:00:02 +0100
commit150244638cd425313523f4c95a353fdeea9f593a (patch)
tree46d50a19faefc38b063cc9938e2bec3ce1fba1c6
parentcdc373563cb620068a6c436678bba3f276be015b (diff)
get rid of the last traces of "checksum"
-rw-r--r--cmd/sigsum/cmd.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/sigsum/cmd.go b/cmd/sigsum/cmd.go
index 417e68d..fc2274e 100644
--- a/cmd/sigsum/cmd.go
+++ b/cmd/sigsum/cmd.go
@@ -50,7 +50,7 @@ func cmdBundle(args []string, policy policy.Policy, optBundleType, optBundleKey,
var reqs []requests.Leaf
for _, path := range args {
- checksum, err := fileHash(path)
+ preimage, err := fileHash(path)
if err != nil {
return fmt.Errorf("bundle: %v", err)
}
@@ -67,7 +67,7 @@ func cmdBundle(args []string, policy policy.Policy, optBundleType, optBundleKey,
req := requests.Leaf{
ShardHint: policy.ShardHint(),
- Preimage: *checksum,
+ Preimage: *preimage,
Signature: *sig,
VerificationKey: *pub,
DomainHint: optBundleDomainHint,
@@ -102,13 +102,13 @@ func cmdFormat(args []string, policy policy.Policy) error {
return fmt.Errorf("format: need exactly one file")
}
- checksum, err := fileHash(args[0])
+ preimage, err := fileHash(args[0])
if err != nil {
return fmt.Errorf("format: %v", err)
}
sd := types.SignedData{
ShardHint: policy.ShardHint(),
- Checksum: *types.HashFn(checksum[:]),
+ Checksum: *types.HashFn(preimage[:]),
}
fmt.Printf("%s", sd.ToBinary())