feat: add more tests to increase coverage
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
@@ -44,6 +45,10 @@ func newClientCert(config *client.ClientCertConfig, rootCA *x509.Certificate, ro
|
||||
}
|
||||
|
||||
block, _ := pem.Decode(rootKeyPEM)
|
||||
if block == nil {
|
||||
return nil, nil, errors.New("pem.Decode")
|
||||
}
|
||||
|
||||
caPrivKey, err := x509.ParsePKCS8PrivateKey(block.Bytes)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("x509.ParsePKCS8PrivateKey: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user