func (rm *Manager) GetCertificateExpirationInfo(name string) (*ExpirationInfo, error) {
	handler, ok := rm.certificates[name]
	if !ok {
		return nil, errors.Errorf("%s is not a known certificate", name)
	}

	// checks if the certificate is externally managed (CA certificate provided without the certificate key)
	externallyManaged, err := rm.IsExternallyManaged(handler.CABaseName)
	if err != nil {
		return nil, err
	}

	// reads the current certificate
	cert, err := handler.readwriter.Read()
	if err != nil {
		return nil, err
	}

	// returns the certificate expiration info
	return newExpirationInfo(name, cert, externallyManaged), nil
}
// GetCertificateExpirationInfo returns certificate expiration info.
// For PKI certificates, use the name defined in the certsphase package, while for certificates
// embedded in the kubeConfig files, use the kubeConfig file name defined in the kubeadm constants package.
// If you use the CertificateRenewHandler returned by Certificates func, handler.Name already contains the right value.
GetCertificateExpirationInfo returns certificate expiration info.
For PKI certificates, use the name defined in the certsphase package, while for certificates
embedded in the kubeConfig files, use the kubeConfig file name defined in the kubeadm constants package.
If you use the CertificateRenewHandler returned by Certificates func, handler.Name already contains the right value.
// GetCertificateExpirationInfo returns certificate expiration info . // For PKI certificates use the name defined in the certsphase package while for certificates // embedded in the kubeConfig files use the kubeConfig file name defined in the kubeadm constants package . // If you use the CertificateRenewHandler returned by Certificates func handler . Name already contains the right value .
func (rm *Manager) GetCertificateExpirationInfo(name string) (*ExpirationInfo, error) {
	handler, ok := rm.certificates[name]
	if !ok {
		return nil, errors.Errorf("%s is not a known certificate", name)
	}
	externallyManaged, err := rm.IsExternallyManaged(handler.CABaseName)
	if err != nil {
		return nil, err
	}
	cert, err := handler.readwriter.Read()
	if err != nil {
		return nil, err
	}
	return newExpirationInfo(name, cert, externallyManaged), nil
}
func ( rm * Manager ) GetCertificateExpirationInfo ( name string ) ( * ExpirationInfo , error ) { handler , ok := rm . certificates [ name ] if ! ok { return nil , errors . Errorf ( " " , name ) } externallyManaged , err := rm . IsExternallyManaged ( handler . CABaseName ) if err != nil { return nil , err } cert , err := handler . readwriter . Read ( ) if err != nil { return nil , err } return newExpirationInfo ( name , cert , externallyManaged ) , nil }
GetCertificateExpirationInfo returns certificate expiration info.
GetCertificateExpirationInfo returns certificate expiration info .
// checks if the certificate is externally managed (CA certificate provided without the certificate key) // reads the current certificate // returns the certificate expiration info