]> Cypherpunks repositories - gostls13.git/commit
encoding/asn1: allow '&' in PrintableString fields
authorchristopher-henderson <chris@chenderson.org>
Fri, 1 Dec 2017 23:17:16 +0000 (16:17 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 5 Dec 2017 18:22:53 +0000 (18:22 +0000)
commiteb441e6d21b31c44d577dd013bc014f0882afc90
treec2b25ce2a689cc7d16ad2db5048d294a2a898e63
parentbcf964de5e16486cec2e102c929768778f50eea2
encoding/asn1: allow '&' in PrintableString fields

There are, unfortunately, intermediate CA ceritificates in circulation
that contain the invalid character '&' in some PrintableString fields,
notably Organization Name. This patch allows for ampersand
to be parsed as though it is valid in an ASN.1 PrintableString.

Fixes #22970

Change-Id: Ifab1a10bbff1cdac68e843c6b857ff1a031051aa
Reviewed-on: https://go-review.googlesource.com/81635
Reviewed-by: Adam Langley <agl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/encoding/asn1/asn1.go
src/encoding/asn1/asn1_test.go
src/encoding/asn1/marshal.go
src/encoding/asn1/marshal_test.go