Skip to content

altcp_tls: set errno to EPERM when handshake fails #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jforissier
Copy link

When a TLS client connects to a server and the handshake fails due to certificate validation, no specific error code is returned to the caller. The TCP connection is simply closed. This is not very user-friendly. Instead the client application would probably want to notify the user of the security issue. For that purpose, set errno to EPERM to indicate that a validation error occured.

This change is upstreamed from U-Boot v2025.07-rc2-26-g9349fc2e9c7 [1].

Link: https://source.denx.de/u-boot/u-boot/-/commit/9349fc2e9c76d042f424edfa69cf421225bf0fcc [1]

When a TLS client connects to a server and the handshake fails due to
certificate validation, no specific error code is returned to the
caller. The TCP connection is simply closed. This is not very
user-friendly. Instead the client application would probably want to
notify the user of the security issue. For that purpose, set errno to
EPERM to indicate that a validation error occured.

This change is upstreamed from U-Boot v2025.07-rc2-26-g9349fc2e9c7 [1].

Link: https://source.denx.de/u-boot/u-boot/-/commit/9349fc2e9c76d042f424edfa69cf421225bf0fcc [1]
Signed-off-by: Jerome Forissier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant