Repository navigation
Add MbedTLS example - #653
Draft
padelsbach wants to merge 1 commit into
Draft
padelsbach wants to merge 1 commit into
padelsbach wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Non-blocking TLS I/O mishandles retryable results and partial writes, while CI dependency fetching fails for SHA inputs and uses unpinned or potentially mismatched commits.
4 open issues
What changed in this PR
Adds an Mbed TLS 4.x client example using wolfPSA’s compatibility layer over wolfSSL, integrated with the repository’s example build and CI infrastructure.
Changes:
- Adds a TLS client with certificate verification and a non-blocking socket option.
- Adds build instructions and checks for TLS 1.2, TLS 1.3, and expected error cases.
- Registers the example in CI and adds dependency-fetch configuration.
| File | Description |
|---|---|
README.md |
Introduces and links the compatibility example. |
mbedtls-compat/README.md |
Documents building, running, testing, and compatibility limitations. |
mbedtls-compat/Makefile |
Builds the client and test servers and exposes check targets. |
mbedtls-compat/client-tls-mbedtls.c |
Implements the client using Mbed TLS APIs. |
mbedtls-compat/check.sh |
Checks protocol versions, socket modes, and error results. |
.gitignore |
Excludes generated example binaries. |
.github/workflows/examples.yml |
Passes the wolfSSL ref to dependency-fetch steps. |
.github/examples-manifest.yml |
Registers the example and its dependency builds. |
Review effort: Balanced
| profile: default | ||
| # wolfPSA master until a release has MBEDTLS_COMPAT, then pin that tag | ||
| fetch: | ||
| - [sh, -c, "test -d ../../wolfssl || git clone -q --depth 1 --branch \"${WOLFSSL_REF:-master}\" https://github.com/wolfSSL/wolfssl ../../wolfssl"] |
| # wolfPSA master until a release has MBEDTLS_COMPAT, then pin that tag | ||
| fetch: | ||
| - [sh, -c, "test -d ../../wolfssl || git clone -q --depth 1 --branch \"${WOLFSSL_REF:-master}\" https://github.com/wolfSSL/wolfssl ../../wolfssl"] | ||
| - [sh, -c, "test -d ../../wolfpsa || git clone -q --depth 1 --branch master https://github.com/wolfSSL/wolfpsa ../../wolfpsa"] |
Comment on lines
+87
to
+89
| ret = mbedtls_ssl_write(&ssl, (const unsigned char*)req, sizeof(req) - 1); | ||
| if (ret <= 0) | ||
| goto out; |
Comment on lines
+92
to
+93
| } while (ret == MBEDTLS_ERR_SSL_WANT_READ || | ||
| ret == MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET); |
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.

No description provided.