aboutsummaryrefslogtreecommitdiff
path: root/instance.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-30 16:09:11 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-30 16:09:11 +0100
commit14f2ed32f13b55dbce0f417f21ccf7b68056ae05 (patch)
tree1d89fd0ac07141d629048b4ff8233f1ab508b3f6 /instance.go
parentb8a8e56d4a311f15060efcd455c444949b2d20b9 (diff)
added max range and get-entries sanity checking
Diffstat (limited to 'instance.go')
-rw-r--r--instance.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/instance.go b/instance.go
index 6b67096..b13bdbe 100644
--- a/instance.go
+++ b/instance.go
@@ -27,6 +27,7 @@ type LogParameters struct {
LogId []byte // used externally by everyone
TreeId int64 // used internally by Trillian
Prefix string
+ MaxRange int64 // max entries per get-entries request
AnchorPool *x509.CertPool // for chain verification
AnchorList []*x509.Certificate // for access to the raw certificates
Signer crypto.Signer
@@ -68,6 +69,7 @@ func NewLogParameters(treeId int64, prefix string, anchorPath, keyPath string) (
LogId: logId,
TreeId: treeId,
Prefix: prefix,
+ MaxRange: 2, // TODO: allow configuration
AnchorPool: anchorPool,
AnchorList: anchorList,
Signer: key,