go/src/encoding/asn1
Andrew Benton d9b1f9e85e encoding/asn1: add NullBytes and NullRawValue for working with ASN.1 NULL
There were a number of places in crypto/x509 that used hardcoded
representations of the ASN.1 NULL type, in both byte slice and
RawValue struct forms. This change adds two new exported vars to
the asn1 package for working with ASN.1 NULL in both its forms, and
converts all usages from the x509 package.

In addition, tests were added to exercise Marshal and Unmarshal on
both vars.

See #19446 for discussion.

Change-Id: I63dbd0835841ccbc810bd6ec794360a84e933f1e
Reviewed-on: https://go-review.googlesource.com/38660
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2017-04-24 22:23:56 +00:00
..
asn1.go encoding/asn1: add NullBytes and NullRawValue for working with ASN.1 NULL 2017-04-24 22:23:56 +00:00
asn1_test.go encoding/asn1: add NullBytes and NullRawValue for working with ASN.1 NULL 2017-04-24 22:23:56 +00:00
common.go encoding/asn1: add NullBytes and NullRawValue for working with ASN.1 NULL 2017-04-24 22:23:56 +00:00
marshal.go encoding/asn1: document "utc" and "generalized" tags 2017-04-11 23:24:58 +00:00
marshal_test.go encoding/asn1: return error instead of dereferencing nil *big.Int in marshaling 2016-10-17 22:29:32 +00:00