forked from TrueCloudLab/lego
Add a comment to GetCertExpiration
This commit is contained in:
parent
34910bd541
commit
3ef08f7413
1 changed files with 1 additions and 0 deletions
|
@ -34,6 +34,7 @@ func pemEncode(data interface{}) []byte {
|
||||||
return pem.EncodeToMemory(pemBlock)
|
return pem.EncodeToMemory(pemBlock)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetCertExpiration returns the "NotAfter" date of a DER encoded certificate.
|
||||||
func GetCertExpiration(cert []byte) (time.Time, error) {
|
func GetCertExpiration(cert []byte) (time.Time, error) {
|
||||||
pCert, err := x509.ParseCertificate(cert)
|
pCert, err := x509.ParseCertificate(cert)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue