aboutsummaryrefslogtreecommitdiff
path: root/crypto.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-27 19:49:24 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-27 19:49:24 +0100
commitaa9189a05fa548bbad80af42a84027a6e9c40737 (patch)
tree6ff8eacf04f0a3bb96eecee96a92b8a50473b348 /crypto.go
parente350e63ccbb6cd84d48a8187c7d7727a4027c3fb (diff)
added buildChainFromDerList tests
Diffstat (limited to 'crypto.go')
-rw-r--r--crypto.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto.go b/crypto.go
index 47c16bb..34451cc 100644
--- a/crypto.go
+++ b/crypto.go
@@ -30,8 +30,8 @@ func (lp *LogParameters) buildChainFromDerList(derChain [][]byte) ([]*x509.Certi
if err != nil {
return nil, fmt.Errorf("chain verification failed: %v", err)
}
- if len(chains) == 0 {
- return nil, fmt.Errorf("bad certificate chain length: empty")
+ if len(chains) == 0 { // better safe than sorry
+ return nil, fmt.Errorf("chain verification failed: no path")
}
// there might be several valid chains