Repository navigation
userauth: enable [email protected] for all backends in userauth_supported_key_sign_algs(), fix tests - #2483
Closed
vszakats wants to merge 12 commits into
Closed
userauth: enable [email protected] for all backends in userauth_supported_key_sign_algs(), fix tests#2483vszakats wants to merge 12 commits into
[email protected] for all backends in userauth_supported_key_sign_algs(), fix tests#2483vszakats wants to merge 12 commits into
Conversation
vszakats
added a commit
that referenced
this pull request
Aug 2, 2026
…lgs()` Cherry-picked from #2483
vszakats
added a commit
that referenced
this pull request
Aug 2, 2026
To make it easier to run tests locally, in particular those using signed keys, with the username embedded in them. Cherry-picked from #2483
vszakats
added a commit
that referenced
this pull request
Aug 2, 2026
Via env `FIXTURE_USER`. To make it easier to run tests locally, in particular those using signed keys, with the username embedded in them. Cherry-picked from #2483
…`userauth_supported_key_sign_algs()`
…OpenSSL/wolfSSL backends)
…at for RSA, allow overriding username
This reverts commit 4c6d2a9aba1403f31ab0335635bc402e2195fd11.
There was a problem hiding this comment.
Pull request overview
This PR removes the OpenSSL-only gating for [email protected] in userauth_supported_key_sign_algs() so RSA certificate authentication can use RFC 8332 signature-algorithm upgrading consistently across crypto backends, and updates the test fixtures to avoid relying on OpenSSH private-key formats where they aren’t supported.
Changes:
- Enable
[email protected]inuserauth_supported_key_sign_algs()for all backends whenLIBSSH2_RSA_SHA2is available. - Update RSA cert-auth tests to use PEM-formatted private keys for non-OpenSSL/non-wolfSSL backends.
- Add new PEM private key fixtures and update the key-generation script to produce them.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/userauth.c | Removes OpenSSL/wolfSSL-only gating so RSA cert key methods participate in supported signing algorithm upgrades across backends. |
| tests/test_auth_pubkey_ok_rsa_signed.c | Switches fixture private key path based on backend to use PEM where needed. |
| tests/test_auth_pubkey_ok_rsa_sha2_512_signed.c | Switches fixture private key path based on backend to use PEM where needed. |
| tests/keys/id_rsa_signed_pem | Adds PEM-formatted RSA private key fixture for non-OpenSSL/non-wolfSSL backends. |
| tests/keys/id_rsa_sha2_512_signed_pem | Adds PEM-formatted RSA private key fixture for non-OpenSSL/non-wolfSSL backends. |
| tests/keys-generate.sh | Generates the new PEM private key fixtures from existing keys. |
Suppressed comments (1)
tests/keys-generate.sh:48
- Same as above: this
ssh-keygen -pinvocation omits-P(old passphrase), which can trigger an interactive prompt. Add-P ''so key conversion to PEM is reliably non-interactive.
ssh-keygen -p -N '' -m PEM -f 'keys/id_rsa_sha2_512_signed_pem'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The PR implementing this did not add anything OpenSSL-specific, yet it
gated the feature OpenSSL only. Turns out the reason for this is that
the test RSA keys are in OpenSSH format, which is only supported by
OpenSSL (and wolfSSL) in libssh2.
Fix by converting the two test keys to PEM format, making them
compatible with all backends. (RSA OpenSSH key format is already tested
separately.)
Also: this also fixes outdated comment fields present in these keys.
Bug: #1314 (comment)
Ref: #2252 (initial fix attempt)
Follow-up to 1410efa #2249
Follow-up to 3a6ab70 #1314
the first place in these tests. RSA OpenSSH is tested separately anyway.