encoding/asn1: be stricter by reserialising parsed times.
The time package does normalisation of times: for example day zero is converted to the last day of the previous month and the 31st of February is moved into March etc. This makes the ASN.1 parsing a little worryingly lax. This change causes the parser to reserialise parsed times to ensure that they round-trip correctly and thus were not normalised. Fixes #11134. Change-Id: I3988bb95153a7b33d64ab861fbe51b1a34a359e9 Reviewed-on: https://go-review.googlesource.com/11094 Run-TryBot: Adam Langley <agl@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Showing
Please register or sign in to comment