aboutsummaryrefslogtreecommitdiff
path: root/client/client.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-03 10:22:57 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-03 10:22:57 +0100
commit1132536be92df9833ccaa72683eaa7e74e10b9e3 (patch)
treeb0a2f02226b12ef053e44a2f84ba9fc37200948c /client/client.go
parentc210c80e80231143f6eaa0f39e8e1d3303983791 (diff)
fixed FindLog such that it uses a list of operators
Diffstat (limited to 'client/client.go')
-rw-r--r--client/client.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/client.go b/client/client.go
index e1663a0..bf854b9 100644
--- a/client/client.go
+++ b/client/client.go
@@ -50,7 +50,7 @@ func (c *Client) AddEntry(ctx context.Context, name, checksum []byte) (*stfe.StI
}{
Item: base64.StdEncoding.EncodeToString(leaf),
Scheme: uint16(tls.Ed25519),
- Signature: base64.StdEncoding.EncodeToString(ed25519.Sign(*c.PrivateKey, serialized)),
+ Signature: base64.StdEncoding.EncodeToString(ed25519.Sign(*c.PrivateKey, leaf)),
Chain: c.b64Chain(),
})
if err != nil {
@@ -79,7 +79,7 @@ func (c *Client) AddEntry(ctx context.Context, name, checksum []byte) (*stfe.StI
if item.Format != stfe.StFormatSignedDebugInfoV1 {
return nil, fmt.Errorf("bad StItem format: %v", item.Format)
}
- if err := item.SignedDebugInfoV1.Verify(c.Log.Scheme, c.Log.PublicKey, serialized); err != nil {
+ if err := item.SignedDebugInfoV1.Verify(c.Log.Scheme, c.Log.PublicKey, leaf); err != nil {
return nil, fmt.Errorf("bad SignedDebugInfoV1 signature: %v", err)
}
return &item, nil