]> Cypherpunks repositories - gostls13.git/commit
encoding/asn1: Improved control of flags and times
authorRichard Barnes <rlb@ipv.sx>
Thu, 12 Feb 2015 07:35:16 +0000 (23:35 -0800)
committerAdam Langley <agl@golang.org>
Tue, 28 Apr 2015 16:35:13 +0000 (16:35 +0000)
commit0bb96beace42f10ab77a9fdd6f0920ad8d89e28c
treeef7d6c99ac23c7ed3e8805a686b762caba16017c
parentd942737f8a3b15a79d2d1252e107edeb2e51d7e5
encoding/asn1: Improved control of flags and times

This change corrects the serialization of asn1.Flag values, so that
when set, they serialize to an empty value, and when unset, they are
omitted. It also adds a format parameter that allows calling code
to control whether time.Time values are serialized as UTCTime or
GeneralizedTime.

Change-Id: I6d97abf009ea317338dab30c80f35a2de7e07104
Reviewed-on: https://go-review.googlesource.com/5970
Reviewed-by: Adam Langley <agl@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
src/encoding/asn1/asn1.go
src/encoding/asn1/asn1_test.go
src/encoding/asn1/common.go
src/encoding/asn1/marshal.go
src/encoding/asn1/marshal_test.go