aboutsummaryrefslogtreecommitdiff
path: root/instance.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-23 18:01:10 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-23 18:01:10 +0200
commit9b38f5a034486c27eaf81062ecdd86a72667e2b0 (patch)
treef2c7a4e4c485214f81aa66882ea69f93c1aa85d1 /instance.go
parent7d62710808a38102c09c4f18b1309bf63051db5e (diff)
added basic trust-anchor code path
Pretty much the bare minimum to load trust anchors from file and check that the submitter's certificate chains back to something valid.
Diffstat (limited to 'instance.go')
-rw-r--r--instance.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/instance.go b/instance.go
index 5fa1b6c..3f53e5f 100644
--- a/instance.go
+++ b/instance.go
@@ -8,6 +8,7 @@ import (
"github.com/golang/glog"
"github.com/google/trillian"
+ "github.com/google/certificate-transparency-go/trillian/ctfe"
ctutil "github.com/google/certificate-transparency-go/trillian/util"
)
@@ -17,17 +18,19 @@ type instance struct {
logID int64
client trillian.TrillianLogClient
deadline time.Duration
+ anchors ctfe.CertValidationOpts
timesource ctutil.TimeSource
}
// NewInstance returns a new STFE instance
-func NewInstance(prefix string, id int64, client trillian.TrillianLogClient, deadline time.Duration, timesource ctutil.TimeSource) *instance {
+func NewInstance(prefix string, id int64, client trillian.TrillianLogClient, deadline time.Duration, timesource ctutil.TimeSource, anchors ctfe.CertValidationOpts) *instance {
return &instance{
prefix: prefix,
logID: id,
client: client,
deadline: deadline,
timesource: timesource,
+ anchors: anchors,
}
}