Repository navigation
Let HTTPS servers on the board accept normal clients - #11677
Merged
Merged
Conversation
wrap_socket(server_side=True) configured mbedTLS with VERIFY_REQUIRED whenever the context had the default root bundle attached, which every ssl.SSLContext() does. On a server that means "require a client certificate", so a plain HTTPS server -- load_cert_chain() and nothing else -- failed every handshake with MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE (-0x7480) and the client saw a timeout. Default server-side contexts to VERIFY_NONE, as CPython's do (CERT_NONE for servers); a context that loaded its own CA with load_verify_locations() still verifies clients. Client-side behaviour is unchanged. Seen on a Pico 2 W serving a captive portal over its softAP; the same code runs on every port using the shared mbedTLS module. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A context holds either the root bundle or its own CA, never both: set_default_verify_paths() and load_verify_locations() clear each other. Skipping the bundle on the server side therefore gives the same result as the separate server branch: no client verification unless a CA was loaded. Fold the check into the bundle branch and shorten the comment. The reasoning stays in the previous commit message. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Board HTTPS servers stop asking visitors for a certificate.
Why
Every normal visit failed, so basic board HTTPS servers did not work.
This series is @tyeth's work, integrated with his permission, to bring Bluetooth to the Pico W and Pico 2 W on zephyr-cp.
CERT_NONEserver defaultload_verify_locations()Tested on Pico 2 W and Metro ESP32-S3: before fails, after serves 3/3
curl -k, no client certOSError -29824(MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE)pico!SERVEDpico!3/3SERVED3/3OSError -29824pico!3/3SERVED3/3Claude Code helped review, test and write this.
I reviewed the change and the results myself.
🤖 Generated with Claude Code