Repository navigation
Conversation
Member
|
Can it just be removed from the default key exchange list? Seems disabling the entire code block isn't strictly necessary? |
There was a problem hiding this comment.
Pull request overview
This PR tightens libssh2’s default key-exchange (KEX) security posture by compiling out SHA1-based KEX methods unless explicitly re-enabled at build time, while ensuring CI continues to exercise the legacy code paths.
Changes:
- Guard SHA1-based Diffie-Hellman KEX implementations and method registrations behind
LIBSSH2_KEX_SHA1_ENABLE. - Document the new default in
RELEASE-NOTES, including how to re-enable SHA1-based KEX at compile time. - Update CI “legacy-options” builds to define
LIBSSH2_KEX_SHA1_ENABLEso the disabled-by-default paths remain tested.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/kex.c |
Wraps SHA1-based KEX methods and their entries in the KEX method table with #ifdef LIBSSH2_KEX_SHA1_ENABLE. |
RELEASE-NOTES |
Adds a deprecation note indicating SHA1-based KEX methods are disabled by default and can be re-enabled via -DLIBSSH2_KEX_SHA1_ENABLE. |
.github/workflows/ci.yml |
Ensures legacy-option CI jobs compile with -DLIBSSH2_KEX_SHA1_ENABLE so SHA1 KEX code remains covered. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vszakats
added a commit
that referenced
this pull request
Jul 29, 2026
Also: - RELEASE-NOTES: announce removal after next release. - allow build-time macro to enable in the meantime. - skip in tests if disabled. - keep testing in CI with other legacy options. - workaround oss-fuzzer hang and timeout after 10 minutes by keeping SHA1-based MACs enabled in the fuzzer build. Ref: #2444 (comment) Follow-up to 99f9353 #2443 Closes #2444
vszakats
added a commit
that referenced
this pull request
Aug 3, 2026
…x fallouts They are `ssh-rsa` and `[email protected]`, and insecure due to their reliance on SHA1 hashes. Also: - hostkey: fix to accept all RSA hostkey methods in common `hostkey_method_ssh_rsa_init()`. - mbedtls: add missing RSA SHA1/SHA2 guards. - mbedtls: cleanup on error in `mbed_pub_priv_key()`. - os400qc3: add missing RSA SHA1/SHA2 guards. (untested) - wincng: add missing RSA SHA1/SHA2 guards. - crypto.h: add missing `#endif` comments. - GHA: move stray `-DLIBSSH2_DSA_ENABLE` to its place. Follow-up to b7ab0fa #1435 - tests: fix to guard RSA tests with `LIBSSH2_RSA`, replacing `LIBSSH2_RSA_SHA1` to keep test coverage. Keep using the latter for testing SHA1-based signatures in `test_auth_pubkey_ok_rsa_signed`. Follow-up to 3e14d67 #2444 Follow-up to 99f9353 #2443 Closes #2501
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.
Also: