• Andrew Benton's avatar
    encoding/asn1: add NullBytes and NullRawValue for working with ASN.1 NULL · d9b1f9e8
    Andrew Benton authored
    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: 's avatarAdam Langley <agl@golang.org>
    d9b1f9e8
asn1_test.go 39.3 KB