From 1224f565a27155c3abef3ecf4d86cf6f472b1374 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sat, 21 May 2022 20:32:17 +0200 Subject: pick-up merkle package TODO(ln5): upgrade sigsum-go dependency in go.mod file --- cmd/sigsum_log_go/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd') 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 -- cgit v1.2.3