aboutsummaryrefslogtreecommitdiff
path: root/pkg/requests/requests_test.go
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2022-03-25 16:36:27 +0100
committerRasmus Dahlberg <rasmus@mullvad.net>2022-03-28 19:10:49 +0200
commit8634892aa6d5d59f73e50652dbe750df263853a3 (patch)
treeb979039d1c63107969f21ef5ce20dc9e827f2ab4 /pkg/requests/requests_test.go
parentace5e7c406dee2ca533d41f5271de0be7403a139 (diff)
sign tree heads and leaves with SSHSIG
Diffstat (limited to 'pkg/requests/requests_test.go')
-rw-r--r--pkg/requests/requests_test.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkg/requests/requests_test.go b/pkg/requests/requests_test.go
index 7102714..365f90f 100644
--- a/pkg/requests/requests_test.go
+++ b/pkg/requests/requests_test.go
@@ -243,10 +243,8 @@ func TestCosignatureFromASCII(t *testing.T) {
func validLeaf(t *testing.T) *Leaf {
t.Helper()
return &Leaf{
- Statement: types.Statement{
- ShardHint: 1,
- Checksum: *newHashBufferInc(t),
- },
+ ShardHint: 1,
+ Preimage: *types.HashFn(newHashBufferInc(t)[:]),
Signature: *newSigBufferInc(t),
VerificationKey: *newPubBufferInc(t),
DomainHint: "example.com",
@@ -257,7 +255,7 @@ func validLeafASCII(t *testing.T) string {
t.Helper()
return fmt.Sprintf("%s=%d\n%s=%x\n%s=%x\n%s=%x\n%s=%s\n",
"shard_hint", 1,
- "checksum", newHashBufferInc(t)[:],
+ "preimage", types.HashFn(newHashBufferInc(t)[:])[:],
"signature", newSigBufferInc(t)[:],
"verification_key", newPubBufferInc(t)[:],
"domain_hint", "example.com",