1
0
mirror of https://github.com/go-acme/lego.git synced 2024-11-28 17:41:10 +02:00

Add a comment to GetCertExpiration

This commit is contained in:
xenolf 2015-10-17 22:27:04 +02:00
parent 34910bd541
commit 3ef08f7413

View File

@ -34,6 +34,7 @@ func pemEncode(data interface{}) []byte {
return pem.EncodeToMemory(pemBlock)
}
// GetCertExpiration returns the "NotAfter" date of a DER encoded certificate.
func GetCertExpiration(cert []byte) (time.Time, error) {
pCert, err := x509.ParseCertificate(cert)
if err != nil {