Repository navigation
feat: add --cacert flag for custom CA verification - #24
Merged
Merged
Conversation
Lets users load-test servers with self-signed certificates by trusting a custom PEM file instead of disabling TLS verification with --insecure. --insecure still wins when both are set. Extracts the shared trust_from_config helper so worker and the --debug path stay in sync. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24 +/- ##
==========================================
+ Coverage 63.79% 70.81% +7.02%
==========================================
Files 16 16
Lines 743 747 +4
==========================================
+ Hits 474 529 +55
+ Misses 269 218 -51 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Add a
--cacert <path>flag that uses a custom PEM file as the trusted root for TLS verification,so servers with self-signed certificates can be load-tested with full verification instead of
--insecure.This builds on the
trustAPI (@tls.TrustedRoot::CustomPemFile) introduced by the async 0.20 upgrade in #20.Changes
Config.cacert : String?plus the--cacertoption in argparse; all Config construction sites updatedtrust_from_config(worker package), reused by the worker loop and the--debugpath in main.Precedence:
--insecurewins over--cacert; otherwiseCustomPemFile(path)when set,SystemRootby defaultparse_argssplit into a thin@env.args()wrapper and a testableparse_args_from(argv)core, enabling CLI parse testsVerification
Config.cacert, absent → None)moon test --target native271/271,moon test(wasm-gc) 195/195 after rebasing onto current mainNote: no end-to-end test against a real self-signed TLS server is included;
certificate loading and validation are exercised by moonbitlang/async's own test suite.
🤖 Generated with Claude Code