aboutsummaryrefslogtreecommitdiff
path: root/pkg/instance/instance.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/instance/instance.go')
-rw-r--r--pkg/instance/instance.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go
index bbd6cde..7ade955 100644
--- a/pkg/instance/instance.go
+++ b/pkg/instance/instance.go
@@ -56,8 +56,11 @@ func (i *Instance) leafRequestFromHTTP(ctx context.Context, r *http.Request) (*r
if err := req.FromASCII(r.Body); err != nil {
return nil, fmt.Errorf("FromASCII: %v", err)
}
-
- if !req.Statement.Verify(&req.VerificationKey, &req.Signature) {
+ stmt := types.Statement{
+ ShardHint: req.ShardHint,
+ Checksum: *types.HashFn(req.Preimage[:]),
+ }
+ if !stmt.Verify(&req.VerificationKey, &req.Signature) {
return nil, fmt.Errorf("invalid signature")
}
shardEnd := uint64(time.Now().Unix())