]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.10] crypto/x509: parse invalid DNS names and email addresses.
authorAdam Langley <agl@golang.org>
Thu, 22 Feb 2018 20:05:29 +0000 (12:05 -0800)
committerAndrew Bonventre <andybons@golang.org>
Thu, 29 Mar 2018 06:07:37 +0000 (06:07 +0000)
commitb8c62b1a89ad49000c282657f6e4192e34231be1
treefa6225d8b120b3d5db1b4c396d36c4561d6f0d28
parent176900a7b74ad59a9307cc5232e708c6dfd7a9e3
[release-branch.go1.10] crypto/x509: parse invalid DNS names and email addresses.

Go 1.10 requires that SANs in certificates are valid. However, a
non-trivial number of (generally non-WebPKI) certificates have invalid
strings in dnsName fields and some have even put those dnsName SANs in
CA certificates.

This change defers validity checking until name constraints are checked.

Fixes #23995, #23711.

Change-Id: I2e0ebb0898c047874a3547226b71e3029333b7f1
Reviewed-on: https://go-review.googlesource.com/96378
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/102783
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
src/crypto/x509/name_constraints_test.go
src/crypto/x509/verify.go
src/crypto/x509/x509.go