Skip to content

client, integration-cli: adjust for go1.25, TLS1.3 handshake#51055

Merged
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:tls13_changes
Sep 29, 2025
Merged

client, integration-cli: adjust for go1.25, TLS1.3 handshake#51055
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:tls13_changes

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Sep 26, 2025

integration-cli: adjust TestHTTPSInfoRogueCert for TLS1.3 handshake

Go 1.25 / TLS 1.3 may produce a generic "handshake failure"
whereas TLS 1.2 may produce a "bad certificate" TLS alert.
See golang/go#56371

https://tip.golang.org/doc/go1.12#tls_1_3

In TLS 1.3 the client is the last one to speak in the handshake, so if
it causes an error to occur on the server, it will be returned on the
client by the first Read, not by Handshake. For example, that will be
the case if the server rejects the client certificate.

client: Client.doRequest: adjust error matching for TLS1.3 handshake

Go 1.25 / TLS 1.3 may produce a generic "handshake failure" whereas
TLS 1.2 may produce a "bad certificate" TLS alert.
See golang/go#56371

https://tip.golang.org/doc/go1.12#tls_1_3

In TLS 1.3 the client is the last one to speak in the handshake, so if
it causes an error to occur on the server, it will be returned on the
client by the first Read, not by Handshake. For example, that will be
the case if the server rejects the client certificate.

@thaJeztah thaJeztah added this to the 29.0.0 milestone Sep 26, 2025
@thaJeztah thaJeztah added status/2-code-review kind/refactor PR's that refactor, or clean-up code labels Sep 26, 2025
@thaJeztah thaJeztah mentioned this pull request Sep 26, 2025
4 tasks
@thaJeztah thaJeztah changed the title client, integration-cli: adjust TestHTTPSInfoRogueCert for TLS1.3 handshake client, integration-cli: for go1.25, TLS1.3 handshake Sep 26, 2025
@thaJeztah thaJeztah changed the title client, integration-cli: for go1.25, TLS1.3 handshake client, integration-cli: adjust for go1.25, TLS1.3 handshake Sep 26, 2025
Go 1.25 /  TLS 1.3 may produce a generic "handshake failure"
whereas TLS 1.2 may produce a "bad certificate" TLS alert.
See golang/go#56371

> https://tip.golang.org/doc/go1.12#tls_1_3
>
> In TLS 1.3 the client is the last one to speak in the handshake, so if
> it causes an error to occur on the server, it will be returned on the
> client by the first Read, not by Handshake. For example, that will be
> the case if the server rejects the client certificate.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Go 1.25 /  TLS 1.3 may produce a generic "handshake failure" whereas
TLS 1.2 may produce a "bad certificate" TLS alert.
See golang/go#56371

> https://tip.golang.org/doc/go1.12#tls_1_3
>
> In TLS 1.3 the client is the last one to speak in the handshake, so if
> it causes an error to occur on the server, it will be returned on the
> client by the first Read, not by Handshake. For example, that will be
> the case if the server rejects the client certificate.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah merged commit a0e91f5 into moby:master Sep 29, 2025
252 of 253 checks passed
@thaJeztah thaJeztah deleted the tls13_changes branch September 29, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor PR's that refactor, or clean-up code module/client status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants