renew: don't use Renew, just create a new cert
This commit is contained in:
parent
227c341f6b
commit
811a3bddfd
@ -226,19 +226,7 @@ func (sd *SecretData) RenewCACert(cluster, name string) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
var newCert []byte
|
||||
|
||||
cert, err := helpers.ParseCertificatePEM(ca.Cert)
|
||||
if err == nil {
|
||||
newCert, err = initca.RenewFromSigner(cert, signer)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
// failed to load or renew, create a new cert from the existing key
|
||||
req := newCACertReq()
|
||||
newCert, _, err = initca.NewFromSigner(req, signer)
|
||||
}
|
||||
|
||||
newCert, _, err := initca.NewFromSigner(newCACertReq(), signer)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user