From aa9189a05fa548bbad80af42a84027a6e9c40737 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Fri, 27 Nov 2020 19:49:24 +0100 Subject: added buildChainFromDerList tests --- crypto.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto.go') 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 -- cgit v1.2.3