Skip to content

Commit 94eabfe

Browse files
committed
doc/go1.21: document changes in crypto/tls related to client authentication alerts
For golang#52113 For golang#58645
1 parent 8008c08 commit 94eabfe

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

doc/go1.21.html

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

0 commit comments

Comments
 (0)