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 /cmd | |
parent | 45d7f7875ce885369b1d1aecc644875cf6bbfdba (diff) |
pick-up merkle package
TODO(ln5): upgrade sigsum-go dependency in go.mod file
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/sigsum_log_go/main.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/sigsum_log_go/main.go b/cmd/sigsum_log_go/main.go index b64da1a..37404da 100644 --- a/cmd/sigsum_log_go/main.go +++ b/cmd/sigsum_log_go/main.go @@ -22,6 +22,7 @@ import ( "google.golang.org/grpc" "git.sigsum.org/sigsum-go/pkg/log" + "git.sigsum.org/sigsum-go/pkg/merkle" "git.sigsum.org/sigsum-go/pkg/types" "git.sigsum.org/sigsum-go/pkg/dns" "git.sigsum.org/log-go/pkg/db" @@ -191,8 +192,8 @@ func newLogIdentity(keyFile string) (crypto.Signer, string, error) { } // newWitnessMap creates a new map of trusted witnesses -func newWitnessMap(witnesses string) (map[types.Hash]types.PublicKey, error) { - w := make(map[types.Hash]types.PublicKey) +func newWitnessMap(witnesses string) (map[merkle.Hash]types.PublicKey, error) { + w := make(map[merkle.Hash]types.PublicKey) if len(witnesses) > 0 { for _, witness := range strings.Split(witnesses, ",") { b, err := hex.DecodeString(witness) @@ -204,7 +205,7 @@ func newWitnessMap(witnesses string) (map[types.Hash]types.PublicKey, error) { if n := copy(vk[:], b); n != types.PublicKeySize { return nil, fmt.Errorf("Invalid public key size: %v", n) } - w[*types.HashFn(vk[:])] = vk + w[*merkle.HashFn(vk[:])] = vk } } return w, nil |