aboutsummaryrefslogtreecommitdiff
path: root/reqres.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-05 12:24:01 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-05 12:24:01 +0100
commitcb8498119a0a3aaf34e09191e5e172173fdbc8ca (patch)
treeddf4cd77b348ba133586fd60fc0a749a2d472165 /reqres.go
parent8bb721bed66d09e27c9577d88d40cb1e48a8783d (diff)
refactored signing/verification parts that are log specific
These methods are now private and attached to LogParameters.
Diffstat (limited to 'reqres.go')
-rw-r--r--reqres.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/reqres.go b/reqres.go
index 20721f1..2fcbcfb 100644
--- a/reqres.go
+++ b/reqres.go
@@ -66,13 +66,13 @@ func (lp *LogParameters) newAddEntryRequest(r *http.Request) ([]byte, []byte, er
}
// Check that there is a valid trust anchor
- chain, err := buildChainFromDerList(lp, entry.Chain)
+ chain, err := lp.buildChainFromDerList(entry.Chain)
if err != nil {
return nil, nil, fmt.Errorf("invalid certificate chain: %v", err)
}
// Check that there is a valid signature
- if err := verifySignature(lp, chain[0], tls.SignatureScheme(entry.SignatureScheme), entry.Item, entry.Signature); err != nil {
+ if err := lp.verifySignature(chain[0], tls.SignatureScheme(entry.SignatureScheme), entry.Item, entry.Signature); err != nil {
return nil, nil, fmt.Errorf("invalid signature: %v", err)
}