-
Notifications
You must be signed in to change notification settings - Fork 0
feat: S08.07 mbedTLS reference integration (host-side adapter + integration tests) #419
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1a0468b
feat: S08.07 slice 1 MbedTlsStream pool scaffold
DavidCozens 9aa22f6
feat: S08.07 slice 2 MbedTlsStream walking-skeleton happy path
DavidCozens 29a6b36
feat: S08.07 slice 3 MbedTlsStream cert-validation policy + integrati…
DavidCozens 1372cc9
fix: S08.07 slice 3 unblock negative-handshake integration tests
DavidCozens 75bf3a3
feat: S08.07 slice 4 MbedTlsStream bounded handshake retry
DavidCozens bc5786f
feat: S08.07 slice 5 MbedTlsStream mTLS + integration scenarios
DavidCozens 5a4cf61
fix: S08.07 MbedTlsStream BioRecv would-block returns WANT_READ
DavidCozens 26cc5e5
refactor: S08.07 MbedTlsStream lifecycle + fail-fast Send/Read
DavidCozens 72856d2
chore: S08.07 MbedTlsFake cleanup
DavidCozens 8de7b01
chore: S08.07 MbedTls integration harness cleanup
DavidCozens 73e8d2d
chore: S08.07 MbedTls test cleanup pass
DavidCozens f7e8785
ci: S08.07 add integration-linux-mbedtls job
DavidCozens 6eb7d48
chore: S08.07 address CodeRabbit findings on PR #419
DavidCozens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "version": 4, | ||
| "configurations": [ | ||
| { | ||
| "name": "Linux (devcontainer, debug preset)", | ||
| "compileCommands": "${workspaceFolder}/build/debug/compile_commands.json", | ||
| "intelliSenseMode": "linux-gcc-x64", | ||
| "cStandard": "gnu11", | ||
| "cppStandard": "gnu++17" | ||
| } | ||
| ] | ||
| } |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # mbedTLS adapter pack — shipped as sources, not a precompiled library. | ||
| # | ||
| # mbedTLS is header-configured: the integrator's mbedtls_config.h flows | ||
| # through upstream headers and changes the size/layout of mbedtls_ssl_context, | ||
| # mbedtls_x509_crt, mbedtls_pk_context, and the visible API surface. | ||
| # Compiling our adapter once into libSolidSyslog.a would silently break | ||
| # consumers that use a different mbedtls_config.h. | ||
| # | ||
| # Instead, this is an INTERFACE library — each consumer (Bdd/Targets/FreeRtos, | ||
| # Tests/MbedTls/*Test, downstream integrator apps) recompiles the adapter | ||
| # sources from Source/ with its own mbedtls_config.h on the include path. | ||
| # Mirrors Platform/FreeRtos/ and Platform/FatFs/ — see | ||
| # project_header_configured_platforms memory. | ||
|
|
||
| add_library(SolidSyslogMbedTls INTERFACE) | ||
|
|
||
| # No adapter sources at S08.07 slice 1 — first content | ||
| # (SolidSyslogMbedTlsStream.h plus the three-TU split) lands in the | ||
| # slice-1 green step. The INTERFACE target exists so the directory and | ||
| # CMake wiring are in place from the plumbing slice. | ||
|
|
||
| target_include_directories(SolidSyslogMbedTls INTERFACE | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/Interface | ||
| ) | ||
|
|
||
| install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Interface/ | ||
| DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
| FILES_MATCHING PATTERN "*.h" | ||
| ) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #ifndef SOLIDSYSLOGMBEDTLSSTREAM_H | ||
| #define SOLIDSYSLOGMBEDTLSSTREAM_H | ||
|
|
||
| #include "ExternC.h" | ||
| #include "SolidSyslogSleep.h" | ||
|
|
||
| struct SolidSyslogStream; | ||
|
|
||
| /* Forward declarations keep the public header free of any mbedTLS include. | ||
| * Integrators include the relevant mbedTLS headers themselves before this | ||
| * one to bring the types into scope. See project_mbedtls_di_handles. */ | ||
| struct mbedtls_ctr_drbg_context; | ||
| struct mbedtls_x509_crt; | ||
| struct mbedtls_pk_context; | ||
|
|
||
| EXTERN_C_BEGIN | ||
|
|
||
| struct SolidSyslogMbedTlsStreamConfig | ||
| { | ||
| struct SolidSyslogStream* Transport; /* underlying byte stream — caller owns */ | ||
| SolidSyslogSleepFunction | ||
| Sleep; /* drives bounded handshake retry between WANT_READ/WANT_WRITE polls — required */ | ||
| struct mbedtls_ctr_drbg_context* Rng; /* seeded CTR-DRBG — caller owns */ | ||
| struct mbedtls_x509_crt* CaChain; /* trust anchors — caller owns */ | ||
| const char* ServerName; /* SNI + cert hostname check; NULL to skip */ | ||
| struct mbedtls_x509_crt* ClientCertChain; /* leaf (+ intermediates); NULL = no mTLS */ | ||
| struct mbedtls_pk_context* ClientKey; /* matching private key; NULL = no mTLS */ | ||
| }; | ||
|
|
||
| struct SolidSyslogStream* SolidSyslogMbedTlsStream_Create(const struct SolidSyslogMbedTlsStreamConfig* config); | ||
| void SolidSyslogMbedTlsStream_Destroy(struct SolidSyslogStream * base); | ||
|
|
||
| EXTERN_C_END | ||
|
|
||
| #endif /* SOLIDSYSLOGMBEDTLSSTREAM_H */ |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: DavidCozens/solid-syslog
Length of output: 390
Harden workflow steps by disabling checkout credential persistence and pinning the test-reporter action to a commit SHA.
persist-credentials: falsetoactions/checkoutsteps missing it (including the checkout step around line 130).dorny/test-reporter@v3usages with a full 40-char commit SHA (including line 142).🔒 Suggested patch
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 130-130: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 142-142: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deferred — captured the action items in memory as a CI hardening chore to run on return to main. The same gaps exist on every other
actions/checkoutanddorny/test-reporterstep in this workflow (see the file overall), so a per-PR partial fix would be inconsistent with the surrounding pattern. Will land as a focused chore PR that sweeps the whole workflow file, picking the test-reporter SHA from the latest v3.x release at that time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavidCozens— understood, that's a sensible approach. Doing a whole-file sweep in a single chore PR is much cleaner than a piecemeal fix that leaves all the sibling steps inconsistent.Would you like me to open a GitHub issue to track the CI hardening chore? I can scope it to:
persist-credentials: falseto allactions/checkoutsteps in.github/workflows/ci.yml.dorny/test-reporter@v3references to the latest v3.x commit SHA at the time of the chore.Just let me know and I'll create it now.
🧠 Learnings used