Add tests for DoUserAuthRequestRsa and DoUserAuthRequestRsaCert#992
Open
yosuke-wolfssl wants to merge 1 commit into
Open
Add tests for DoUserAuthRequestRsa and DoUserAuthRequestRsaCert#992yosuke-wolfssl wants to merge 1 commit into
yosuke-wolfssl wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the tests/auth.c authentication test harness to add new negative/positive test coverage for RSA public-key authentication and RSA X.509 certificate-based public-key authentication, specifically exercising the RSA signature verification paths (DoUserAuthRequestRsa / DoUserAuthRequestRsaCert) and certificate chain verification.
Changes:
- Extend the auth test server thread arguments and pubkey server context to optionally carry a CA certificate and a configurable
userAuthcallback. - Add an RSA “bad signature” test that signs with a different private key while presenting the authorized public key (ensuring signature verification fails past the authorized-key hash check).
- Add RSA X.509 cert auth tests (success + bad signature) gated behind the relevant certificate/RSA/SHA1-related compile-time macros.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/auth.h | Extends thread_args to include an optional server userAuth callback and optional CA cert buffer info for cert-based auth tests. |
| tests/auth.c | Adds RSA bad-signature and RSA cert auth tests; updates pubkey server thread to optionally register a CA cert and to take the userAuth callback from thread_args. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #992
No scan targets match the changed files in this PR. Review skipped.
89f8741 to
4d07e24
Compare
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.
This PR adds the tests for DoUserAuthRequestRsa and DoUserAuthRequestRsaCert to exercise RSA signature verification path and certificate verification accordingly.
Addressed by f_4584