]> Cypherpunks repositories - gostls13.git/commit
encoding/asn1: add NullBytes and NullRawValue for working with ASN.1 NULL
authorAndrew Benton <andrewmbenton@gmail.com>
Tue, 7 Mar 2017 22:00:54 +0000 (14:00 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 24 Apr 2017 22:23:56 +0000 (22:23 +0000)
commitd9b1f9e85ee097ebc95c5904cee921ba7be4f732
tree71a8ba44320634797a2e104ef51fde1dd995013a
parent8fcd69d330d53d05ba50003de189e38db12b6227
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>
src/crypto/x509/x509.go
src/encoding/asn1/asn1.go
src/encoding/asn1/asn1_test.go
src/encoding/asn1/common.go