Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aligns ssh2_supported_key_sign_algs() across several crypto backends by removing build-time warnings and ensuring correct behavior when RSA-SHA2 support is compiled out (e.g., no-RSA builds), while preserving the known OpenSSL-specific functional exception introduced in #1314.
Changes:
- Wrap RSA-SHA2-specific logic in
#if LIBSSH2_RSA_SHA2for the OS/400 QC3 backend to avoid advertising RSA-SHA2 when not built. - Add
(void)key_method/(void)key_method_lencasts in non-RSA-SHA2 builds (OpenSSL, mbedTLS) to suppress unused-parameter warnings. - Keep
sessionexplicitly unused via(void)sessionconsistently.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/os400qc3.c | Gates RSA-SHA2 return values behind LIBSSH2_RSA_SHA2 and silences unused parameters for no-RSA builds. |
| src/openssl.c | Silences unused parameters when LIBSSH2_RSA_SHA2 is disabled (without changing OpenSSL’s existing functional behavior). |
| src/mbedtls.c | Silences unused parameters when LIBSSH2_RSA_SHA2 is disabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vszakats
added a commit
that referenced
this pull request
Jul 8, 2026
They were shared between all crypto backends, except openssl, which supports an extra key method. Retain this exception by using the `LIBSSH2_OPENSSL` guards. This is a workaround, but I deem it fine, due to already existing evidence for per-crypto-backend logic in non-crypto code, and the codebase already making this exception in tests. A better option would be introducing a crypto-feature macro flag, maybe in a future commit. Perhaps also worth a check whether the exception is necessary. Ref: 3a6ab70 #1314 Follow-up to 82ffc1b #2248 Closes #2249
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.
in 3a6ab70 Support RSA SHA2 cert-based authentication (rsa-sha2-512_cert and rsa-sha2-256_cert) #1314