From e7d80645f5f3795183ff6062a6529ea226d8ef47 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Wed, 4 Nov 2020 12:10:33 +0100 Subject: added certificate chain length checking --- instance.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'instance.go') diff --git a/instance.go b/instance.go index 461ab6c..178b058 100644 --- a/instance.go +++ b/instance.go @@ -27,6 +27,7 @@ type LogParameters struct { TreeId int64 // used internally by Trillian Prefix string MaxRange int64 // max entries per get-entries request + MaxChain int64 // max submitter certificate chain length AnchorPool *x509.CertPool // for chain verification AnchorList []*x509.Certificate // for access to the raw certificates Signer crypto.Signer @@ -77,6 +78,7 @@ func NewLogParameters(treeId int64, prefix string, anchorPath, keyPath string) ( TreeId: treeId, Prefix: prefix, MaxRange: 2, // TODO: allow configuration + MaxChain: 3, // TODO: allow configuration AnchorPool: anchorPool, AnchorList: anchorList, Signer: key, -- cgit v1.2.3