Fix typo in error message and comment

pull/1764/head
Mariano Cano 2 months ago
parent 10f6a901ec
commit 0ac9023590
No known key found for this signature in database

@ -913,7 +913,10 @@ func (a *Authority) GetTLSCertificate() (*tls.Certificate, error) {
return fatal(err)
}
// For StepCAS RA let the lifetime to the provisioner used by the CA.
// Set the cert lifetime as follows:
// i) If the CA is not a StepCAS RA use 24h, else
// ii) if the CA is a StepCAS RA, leave the lifetime empty and
// let the provisioner of the CA decide the lifetime of the RA cert.
var lifetime time.Duration
if casapi.TypeOf(a.x509CAService) != casapi.StepCAS {
lifetime = 24 * time.Hour

@ -79,7 +79,7 @@ func (s *StepCAS) CreateCertificate(req *apiv1.CreateCertificateRequest) (*apiv1
case req.Template == nil:
return nil, errors.New("createCertificateRequest `template` cannot be nil")
case req.Lifetime < 0:
return nil, errors.New("createCertificateRequest `lifetime` cannot less than 0")
return nil, errors.New("createCertificateRequest `lifetime` cannot be less than 0")
}
info := &raInfo{

Loading…
Cancel
Save