Skip to content

Commit 3ca90ed

Browse files
anitgandhigopherbot
authored andcommitted
doc/go1.21: document changes in crypto/tls related to client authentication alerts
For #52113 For #58645 Change-Id: Id7dff2570132588da95fb4216a86faf34fa2cbdc GitHub-Last-Rev: 94eabfe GitHub-Pull-Request: #60972 Reviewed-on: https://go-review.googlesource.com/c/go/+/505436 Run-TryBot: Roland Shoemaker <[email protected]> Auto-Submit: Roland Shoemaker <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]>
1 parent 3c25d83 commit 3ca90ed

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

doc/go1.21.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,32 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
585585
The new <a href="/pkg/crypto/tls/#VersionName"><code>VersionName</code></a> function
586586
returns the name for a TLS version number.
587587
</p>
588+
589+
<p><!-- https://go.dev/issue/52113, CL 410496 -->
590+
The TLS alert codes sent from the server for client authentication failures have
591+
been improved. Prior to Go 1.21, these failures always resulted in a "bad certificate" alert.
592+
Starting from Go 1.21, certain failures will result in more appropriate alert codes,
593+
as defined by RFC 5246 and RFC 8446:
594+
<ul>
595+
<li>
596+
For TLS 1.3 connections, if the server is configured to require client authentication using
597+
<a href="/pkg/crypto/tls/#RequireAnyClientCert"></code>RequireAnyClientCert</code></a> or
598+
<a href="/pkg/crypto/tls/#RequireAndVerifyClientCert"></code>RequireAndVerifyClientCert</code></a>,
599+
and the client does not provide any certificate, the server will now return the "certificate required" alert.
600+
</li>
601+
<li>
602+
If the client provides a certificate that is not signed by the set of trusted certificate authorities
603+
configured on the server, the server will return the "unknown certificate authority" alert.
604+
</li>
605+
<li>
606+
If the client provides a certificate that is either expired or not yet valid,
607+
the server will return the "expired certificate" alert.
608+
</li>
609+
<li>
610+
In all other scenarios related to client authentication failures, the server still returns "bad certificate".
611+
</li>
612+
</ul>
613+
</p>
588614
</dd>
589615
</dl><!-- crypto/tls -->
590616

0 commit comments

Comments
 (0)