Skip to content

Commit 074f2d8

Browse files
committed
doc/go1.15: surface the crypto/x509 CommonName deprecation note
Updates #39568 Updates #37419 Updates #24151 Change-Id: I44c940e09e26a039076396bbfecb2b1574197cf7 Reviewed-on: https://go-review.googlesource.com/c/go/+/243221 Reviewed-by: Kevin Burke <kev@inburke.com>
1 parent 78c20c8 commit 074f2d8

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

Diff for: doc/go1.15.html

+17-9
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,23 @@ <h3 id="cgo">Cgo</h3>
386386
documentation</a> for more information.
387387
</p>
388388

389+
<h3 id="commonname">X.509 CommonName deprecation</h3>
390+
391+
<p><!-- CL 231379 -->
392+
The deprecated, legacy behavior of treating the <code>CommonName</code>
393+
field on X.509 certificates as a host name when no Subject Alternative Names
394+
are present is now disabled by default. It can be temporarily re-enabled by
395+
adding the value <code>x509ignoreCN=0</code> to the <code>GODEBUG</code>
396+
environment variable.
397+
</p>
398+
399+
<p>
400+
Note that if the <code>CommonName</code> is an invalid host name, it's always
401+
ignored, regardless of <code>GODEBUG</code> settings. Invalid names include
402+
those with any characters other than letters, digits, hyphens and underscores,
403+
and those with empty labels or trailing dots.
404+
</p>
405+
389406
<h3 id="minor_library_changes">Minor changes to the library</h3>
390407

391408
<p>
@@ -523,15 +540,6 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
523540
certificates with trailing dots.
524541
</p>
525542

526-
<p><!-- CL 231379 -->
527-
The deprecated, legacy behavior of treating the <code>CommonName</code>
528-
field as a hostname when no Subject Alternative Names are present is now
529-
disabled by default. It can be temporarily re-enabled by adding the value
530-
<code>x509ignoreCN=0</code> to the <code>GODEBUG</code> environment
531-
variable. If the <code>CommonName</code> is an invalid hostname, it's
532-
always ignored.
533-
</p>
534-
535543
<p><!-- CL 217298 -->
536544
The new <a href="/pkg/crypto/x509/#CreateRevocationList"><code>CreateRevocationList</code></a>
537545
function and <a href="/pkg/crypto/x509/#RevocationList"><code>RevocationList</code></a> type

0 commit comments

Comments
 (0)