code: func ValidateCertificateDates(cert *x509.Certificate) error {
  	if cert == nil {
  		return nil
  	}
  	if time.Now().UTC().Before(cert.NotBefore) {
  		return errors.New("Certificate provided is not valid until later date")
  	}
  
  	if time.Now().UTC().After(cert.NotAfter) {
  		return errors.New("Certificate provided has expired")
  	}
  	return nil
  }
docs: //ValidateCertificateDates used to verify if certificate was expired or not valid until later date