From cb66b63918f84abb0487d42be3b74dfb67ea37d6 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Fri, 21 Mar 2014 11:14:38 -0400 Subject: [PATCH] encoding/asn1: use GeneralizedTime for times outside the range of UTCTime. Fixes issue #6976. LGTM=r R=golang-codereviews, r CC=golang-codereviews https://golang.org/cl/72080044 --- generate_cert.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/generate_cert.go b/generate_cert.go index 1b4830c..5c6d839 100644 --- a/generate_cert.go +++ b/generate_cert.go @@ -58,12 +58,6 @@ func main() { notAfter := notBefore.Add(*validFor) - // end of ASN.1 time - endOfTime := time.Date(2049, 12, 31, 23, 59, 59, 0, time.UTC) - if notAfter.After(endOfTime) { - notAfter = endOfTime - } - serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128) serialNumber, err := rand.Int(rand.Reader, serialNumberLimit) if err != nil {