feat: use viper and cobra to parameterize creation values with viper yaml
This commit is contained in:
@@ -55,7 +55,7 @@ func encodePrivateKey(priv *ecdsa.PrivateKey) ([]byte, error) {
|
||||
}
|
||||
|
||||
// Create a self-signed certificate.
|
||||
func newRootCA(config ca.CaConfig) ([]byte, []byte, error) {
|
||||
func newRootCA(config *ca.CaConfig) ([]byte, []byte, error) {
|
||||
priv, err := newPrivateKey()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("newPrivateKey: %s", err)
|
||||
@@ -178,7 +178,7 @@ func (r *rootCA) PEM() []byte {
|
||||
return r.caPEM
|
||||
}
|
||||
|
||||
func NewRootCA(config ca.CaConfig) (ca.RootCACertificateIface, error) {
|
||||
func NewRootCA(config *ca.CaConfig) (ca.RootCACertificateIface, error) {
|
||||
caPEM, keyPEM, err := newRootCA(config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("newRootCA: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user