Skip to content

Commit

Permalink
feat: karmadactl add ca-cert-path and ca-key-path opts
Browse files Browse the repository at this point in the history
  • Loading branch information
guozheng-shen committed Jul 4, 2024
1 parent 7a24c54 commit fcfe392
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/karmadactl/cmdinit/cert/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,7 @@ func GenCerts(pkiPath, caCertPath, caKeyPath string, etcdServerCertCfg, etcdClie
return genEtcdCerts(pkiPath, etcdServerCertCfg, etcdClientCertCfg)
}

func getCertAndKey(caCertPath, caKeyPath string) (*x509.Certificate, *crypto.Signer, error) {
var caCert *x509.Certificate
var caKey *crypto.Signer
var err error
func getCertAndKey(caCertPath, caKeyPath string) (caCert *x509.Certificate, caKey *crypto.Signer, err error) {
if caKeyPath != "" && caCertPath != "" {
certificate, err := tls.LoadX509KeyPair(caCertPath, caKeyPath)
if err != nil {
Expand Down

0 comments on commit fcfe392

Please sign in to comment.