From 3f8010612c376ba9775101a3c823125ce9c82304 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 28 Mar 2022 13:18:52 +0200 Subject: follow SSHSIG changes in lib --- pkg/instance/handler_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/instance/handler_test.go') diff --git a/pkg/instance/handler_test.go b/pkg/instance/handler_test.go index f8817dc..8a48860 100644 --- a/pkg/instance/handler_test.go +++ b/pkg/instance/handler_test.go @@ -658,7 +658,7 @@ func mustHandle(t *testing.T, i Instance, e types.Endpoint) Handler { return Handler{} } -func mustLeafBuffer(t *testing.T, shardHint uint64, checksum types.Hash, wantSig bool) io.Reader { +func mustLeafBuffer(t *testing.T, shardHint uint64, preimage types.Hash, wantSig bool) io.Reader { t.Helper() vk, sk, err := ed25519.GenerateKey(rand.Reader) @@ -667,7 +667,7 @@ func mustLeafBuffer(t *testing.T, shardHint uint64, checksum types.Hash, wantSig } msg := types.Statement{ ShardHint: shardHint, - Checksum: checksum, + Checksum: *types.HashFn(preimage[:]), } sig := ed25519.Sign(sk, msg.ToBinary()) if !wantSig { @@ -676,7 +676,7 @@ func mustLeafBuffer(t *testing.T, shardHint uint64, checksum types.Hash, wantSig return bytes.NewBufferString(fmt.Sprintf( "%s=%d\n"+"%s=%x\n"+"%s=%x\n"+"%s=%x\n"+"%s=%s\n", "shard_hint", shardHint, - "checksum", checksum[:], + "preimage", preimage[:], "signature", sig, "verification_key", vk, "domain_hint", "example.com", -- cgit v1.2.3