]> Cypherpunks repositories - gostls13.git/commit
encoding/asn1: fix returned type for an Object Identifier
authorConstantin Konstantinidis <constantinkonstantinidis@gmail.com>
Sat, 19 May 2018 11:59:29 +0000 (13:59 +0200)
committerFilippo Valsorda <filippo@golang.org>
Thu, 31 May 2018 15:24:46 +0000 (15:24 +0000)
commit6b4828a206c2c5a5b6bf3cd4bd92b9530ecca5e5
tree0cb7c96fdbb1589176baa40da444019bcd2d17c0
parentc4f9fa1f8ee623558ed40d4d4cd3c616697cc77b
encoding/asn1: fix returned type for an Object Identifier

Unmarshal/Marshal/Unmarshal was not idempotent as the Object Identifier
type was not returned through the interface. The limit case OID = 0
returns an error. The zero OID is 0.0

A test is fixed to use the Object Identifier type.
Other related test are added.

Fixes #11130

Change-Id: I15483a3126066c9b99cf5bd9c4b0cc15ec1d61ca
Reviewed-on: https://go-review.googlesource.com/113837
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
src/encoding/asn1/asn1.go
src/encoding/asn1/asn1_test.go
src/encoding/asn1/marshal_test.go