diff options
author | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-05-21 20:32:17 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-05-21 20:32:17 +0200 |
commit | 1224f565a27155c3abef3ecf4d86cf6f472b1374 (patch) | |
tree | 8eecc23f18f2b65ef25e5c67c7ec7b499d3c3129 /pkg/instance/instance.go | |
parent | 45d7f7875ce885369b1d1aecc644875cf6bbfdba (diff) |
pick-up merkle package
TODO(ln5): upgrade sigsum-go dependency in go.mod file
Diffstat (limited to 'pkg/instance/instance.go')
-rw-r--r-- | pkg/instance/instance.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 7f84bbb..35e24f7 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -10,6 +10,7 @@ import ( "git.sigsum.org/log-go/pkg/db" "git.sigsum.org/log-go/pkg/state" "git.sigsum.org/sigsum-go/pkg/dns" + "git.sigsum.org/sigsum-go/pkg/merkle" "git.sigsum.org/sigsum-go/pkg/requests" "git.sigsum.org/sigsum-go/pkg/types" ) @@ -25,7 +26,7 @@ type Config struct { ShardStart uint64 // Shard interval start (num seconds since UNIX epoch) // Witnesses map trusted witness identifiers to public keys - Witnesses map[types.Hash]types.PublicKey + Witnesses map[merkle.Hash]types.PublicKey } // Instance is an instance of the log's front-end @@ -63,7 +64,7 @@ func (i *Instance) leafRequestFromHTTP(ctx context.Context, r *http.Request) (*r } stmt := types.Statement{ ShardHint: req.ShardHint, - Checksum: *types.HashFn(req.Message[:]), + Checksum: *merkle.HashFn(req.Message[:]), } if !stmt.Verify(&req.PublicKey, &req.Signature) { return nil, fmt.Errorf("invalid signature") |