ca: make receiver variable name consistent

Every other method uses c not ca
This commit is contained in:
Daniel Nephin 2021-10-10 15:08:46 -04:00
parent 8de8b7c011
commit 20f0efd8c1
1 changed files with 2 additions and 2 deletions

View File

@ -1539,12 +1539,12 @@ func (c *CAManager) SignCertificate(csr *x509.CertificateRequest, spiffeID conne
return &reply, nil
}
func (ca *CAManager) checkExpired(pem string) error {
func (c *CAManager) checkExpired(pem string) error {
cert, err := connect.ParseCert(pem)
if err != nil {
return err
}
if cert.NotAfter.Before(ca.timeNow()) {
if cert.NotAfter.Before(c.timeNow()) {
return fmt.Errorf("certificate expired, expiration date: %s ", cert.NotAfter.String())
}
return nil