]> Cypherpunks repositories - gostls13.git/commit
encoding/asn1: support 31 bit identifiers with OID
authorMonis Khan <mkhan@redhat.com>
Wed, 12 Apr 2017 20:00:58 +0000 (16:00 -0400)
committerAdam Langley <agl@golang.org>
Thu, 13 Apr 2017 00:49:49 +0000 (00:49 +0000)
commit94aba76639cf4d5e30975d846bb0368db8202269
tree570d8bad0714b1fe2fe2c5068ff8894147bad8ae
parent8a2cc222098539a687accef75f0d1551079ca6c9
encoding/asn1: support 31 bit identifiers with OID

The current implementation uses a max of 28 bits when decoding an
ObjectIdentifier.  This change makes it so that an int64 is used to
accumulate up to 35 bits.  If the resulting data would not overflow
an int32, it is used as an int.  Thus up to 31 bits may be used to
represent each subidentifier of an ObjectIdentifier.

Fixes #19933

Change-Id: I95d74b64b24cdb1339ff13421055bce61c80243c
Reviewed-on: https://go-review.googlesource.com/40436
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