File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -583,6 +583,32 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
583
583
The new < a href ="/pkg/crypto/tls/#VersionName "> </ code > VersionName</ code > </ a > function
584
584
returns the name for a TLS version number.
585
585
</ 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 >
586
612
</ dd >
587
613
</ dl > <!-- crypto/tls -->
588
614
You can’t perform that action at this time.
0 commit comments