aboutsummaryrefslogtreecommitdiff
path: root/verify.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-05 12:37:35 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-05 12:37:35 +0100
commit906f3161dbbff07515244134e0e88641dd68fbb3 (patch)
treee2a449a670c90f9b3a4dca907e1b0ea79581c179 /verify.go
parent88ae8d5813002a66c83de21f1f6c8eb8da544b2a (diff)
added doc
Diffstat (limited to 'verify.go')
-rw-r--r--verify.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/verify.go b/verify.go
index c65043b..47c16bb 100644
--- a/verify.go
+++ b/verify.go
@@ -12,12 +12,14 @@ import (
"github.com/system-transparency/stfe/x509util"
)
+// buildChainFromDerList builds an X.509 certificate chain from a list of
+// DER-encoded certificates using the log's configured trust anchors, extended
+// key-usages, and maximum chain length (which includes the trust anchor).
func (lp *LogParameters) buildChainFromDerList(derChain [][]byte) ([]*x509.Certificate, error) {
certificate, intermediatePool, err := x509util.ParseDerChain(derChain)
if err != nil {
return nil, err
}
-
opts := x509.VerifyOptions{
Roots: lp.AnchorPool,
Intermediates: intermediatePool,