Repository navigation
userauth: try allowing [email protected] for all backends - #2252
Closed
vszakats wants to merge 3 commits into
Closed
vszakats wants to merge 3 commits into
vszakats wants to merge 3 commits into
Conversation
…backends Follow-up to 1410efa libssh2#2249 Follow-up to 3a6ab70 libssh2#1314
There was a problem hiding this comment.
Pull request overview
This PR broadens RSA certificate ([email protected]) handling in userauth.c so RSA-SHA2 signature algorithm upgrades are no longer gated to the OpenSSL/WolfSSL backends, aligning behavior across crypto backends.
Changes:
- Allow
[email protected]to participate in RSA-SHA2 upgrade algorithm selection for all backends (whenLIBSSH2_RSA_SHA2is enabled). - Relax a test compile-time guard so the ECDSA signed-cert auth test is enabled whenever
LIBSSH2_ECDSAis available.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_auth_pubkey_ok_ecdsa_signed.c | Expands when the ECDSA signed certificate auth integration test is compiled/run. |
| src/userauth.c | Removes backend-specific gating so RSA cert keys can use the RSA-SHA2 upgrade list on all backends. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
1313
to
+1316
| if((key_method_len == 7 && | ||
| !memcmp(key_method, "ssh-rsa", key_method_len)) | ||
| #if defined(LIBSSH2_OPENSSL) || defined(LIBSSH2_WOLFSSL) | ||
| || (key_method_len == 28 && | ||
| !memcmp(key_method, "[email protected]", key_method_len)) | ||
| #endif | ||
| ) { | ||
| !memcmp(key_method, "ssh-rsa", key_method_len)) || | ||
| (key_method_len == 28 && | ||
| !memcmp(key_method, "[email protected]", key_method_len))) { |
Member
Author
|
Nope, this looks wrong, I'm not sure, but this seems to advertise Closing without merge. |
1 task done
vszakats
added a commit
that referenced
this pull request
Aug 2, 2026
…userauth_supported_key_sign_algs()`, fix tests 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 Closes #2483
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. This may be due to OpenSSL supporting a
necessary feature built-in, while others don't. Yet, I wonder if enabling
it everywhere could cause issues?
Ref: #1314 (comment)
Follow-up to 1410efa #2249
Follow-up to 3a6ab70 #1314