]> Cypherpunks repositories - gostls13.git/commit
encoding/asn1: make sure implicit fields roundtrip
authorRoland Shoemaker <roland@golang.org>
Mon, 3 Mar 2025 17:04:35 +0000 (09:04 -0800)
committerRoland Shoemaker <roland@golang.org>
Fri, 14 Mar 2025 18:40:43 +0000 (11:40 -0700)
commit7e3d2aa69f0ad7dc0cb78ff9e5ee8fdd819a541a
tree61e65523e8c9a6bd6e92d6ed7b3c1d640e5a4e6a
parenta1ddbdd3ef8b739aab53f20d6ed0a61c3474cf12
encoding/asn1: make sure implicit fields roundtrip

Make sure Marshal and Unmarshal support the same field tags for implicit
encoding choices. In particular this adds support for Unmarshalling
implicitly tagged GeneralizedTime fields. Also add tests and update the
docs.

Fixes #72078

Change-Id: I21465ee4bcd73a7db0d0c36b2df53cabfc480185
Reviewed-on: https://go-review.googlesource.com/c/go/+/654275
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/encoding/asn1/asn1.go
src/encoding/asn1/asn1_test.go
src/encoding/asn1/marshal.go