feat: add more tests to increase coverage
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
@@ -52,6 +53,9 @@ func (r *rootCA) WithClientCert(config *client.ClientCertConfig) (client.ClientC
|
||||
|
||||
// Create a self-signed certificate.
|
||||
func newRootCA(config *ca.CaConfig) ([]byte, []byte, error) {
|
||||
if config == nil {
|
||||
return nil, nil, errors.New("ca.CaConfig config is nil")
|
||||
}
|
||||
priv, err := newPrivateKey()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("newPrivateKey: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user