Sitelet https://github.com/libssh2/libssh2/pull/2598
Skip to content

drop DSA (ssh-dss) support - #2598

Open
vszakats wants to merge 17 commits into
libssh2:masterfrom
vszakats:drop-dsa
Open

vszakats wants to merge 17 commits into
libssh2:masterfrom
vszakats:drop-dsa

Conversation

@vszakats

@vszakats vszakats commented Sep 11, 2026 •

Copy link
Copy Markdown
Member
  • DSA was deprecated in the last stable libssh2 release in 2024, with
    its deletion scheduled for April 2025.
  • It has been considered insecure for well over a decade.
  • It was fully dropped by OpenSSH 10.0 (2025-04-09).
    Ref: https://www.openssh.org/txt/release-10.0

Maintenance, fixing bugs and vulnerabilities and further development is
a pointless effort for the reasons above.

Supported alternatives:

  • RSA, with all crypto backends
  • ECDSA, with mbedTLS, OpenSSL/forks/wolfSSL, WinCNG (build-time option)
  • ED25519, with OpenSSL/forks

Ref: GHSA-9mh3-9gqq-mxgv


  • shall we do this now?

@vszakats
vszakats marked this pull request as draft September 11, 2026 15:26
@vszakats
vszakats requested review from MichaelBuckley and willco007 and a balanced review from Copilot September 11, 2026 15:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A remaining negative authentication test becomes a false positive, and several public documentation statements no longer match behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Removes deprecated ssh-dss support across cryptographic backends, host-key handling, tests, and build metadata.

Changes:

  • Removes DSA implementations and capability flags.
  • Removes DSA test fixtures and CI configuration.
  • Updates release and backend documentation.
File summaries
File Description
.github/workflows/ci.yml Removes DSA build flags.
RELEASE-NOTES Announces DSA removal.
os400/README400 Updates crypto support wording.
src/HACKING-CRYPTO.md Removes DSA backend documentation.
src/crypto.h Removes DSA interfaces and PEM constants.
src/crypto_config.h Removes DSA feature configuration.
src/hostkey.c Removes ssh-dss host-key support.
src/knownhost.c Removes dedicated DSA known-host handling.
src/libgcrypt.c Removes libgcrypt DSA operations.
src/libgcrypt.h Removes libgcrypt DSA declarations.
src/mbedtls.h Removes obsolete DSA capability flag.
src/openssl.c Removes OpenSSL DSA operations.
src/openssl.h Removes OpenSSL DSA configuration and types.
src/os400qc3.c Removes dormant QC3 DSA registration.
src/os400qc3.h Removes obsolete DSA capability flag.
src/version.c Removes DSA from build options.
src/wincng.c Removes WinCNG DSA implementation.
src/wincng.h Removes WinCNG DSA declarations.
tests/.gitignore Removes deleted DSA test binary.
tests/Makefile.inc Removes DSA test and fixtures.
tests/keys-generate.sh Stops generating DSA keys.
tests/keys/id_dsa Deletes DSA private key fixture.
tests/keys/id_dsa.pub Deletes DSA public key fixture.
tests/keys/id_dsa_wrong Deletes negative DSA private key fixture.
tests/keys/id_dsa_wrong.pub Deletes negative DSA public key fixture.
tests/openssh_server/authorized_keys Removes authorized DSA key.
tests/test_auth_pubkey_ok_dsa.c Deletes DSA authentication test.
Review details

Suppressed comments (1)

tests/keys/id_dsa_wrong:1

  • Deleting this key pair leaves test_auth_pubkey_fail.c pointing at nonexistent files. Because test_auth_pubkey() treats any nonzero result as the expected authentication failure, the test now passes on a local file-open error without exercising server-side rejection. Repoint it to a retained, unauthorized key pair (for example, the host CA key) or add a replacement negative fixture.
  • Files reviewed: 27/27 changed files
  • Comments generated: 4
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread RELEASE-NOTES Outdated
Comment thread os400/README400 Outdated
Comment thread src/hostkey.c
Comment thread src/knownhost.c

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The negative authentication test now passes on missing fixture errors, and several edited API descriptions remain incomplete.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

tests/keys/id_dsa_wrong:1

  • Deleting this key pair leaves test_auth_pubkey_fail.c pointing at files that no longer exist. That test treats every nonzero authentication result as success (session_fixture.c:538-549), so it will now pass on a local file-open error without exercising rejection of a valid but unauthorized key. Replace these fixtures and references with a supported, unauthorized key pair (and keep it out of authorized_keys).
  • Files reviewed: 31/31 changed files
  • Comments generated: 4
  • Review effort level: Balanced

Comment thread docs/libssh2_knownhost_add.md Outdated
Comment thread docs/libssh2_knownhost_addc.md Outdated
Comment thread docs/libssh2_session_hostkey.md Outdated
Comment thread src/knownhost.c Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The retained negative public-key authentication test silently passes using deleted DSA fixtures instead of testing server rejection.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 31/31 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread tests/Makefile.inc

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The broad cryptographic and public compatibility impact warrants final human validation across supported backends.

Review details
  • Files reviewed: 34/34 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@vszakats
vszakats marked this pull request as ready for review September 11, 2026 19:16
@MichaelBuckley

Copy link
Copy Markdown
Contributor

From a purely code perspective, the changes look good and accomplish what this PR sets out to do.

On a personal note, we recently polled users about the upcoming removal of DSA support and heard from users who still rely on it to access old hardware. They had setups with servers on discontinued architectures running on local networks not connected to the internet.

So we'll probably have to retain DSA support in our personal fork of libssh2. It's a bummer for us since we were very close to being able to use libssh2 unmodified. But the removal was announced long ago and the deadline has passed. DSA is totally busted and no one should use it, so it makes sense to remove it. It's just unfortunate users are still using it.

vszakats added a commit that referenced this pull request Sep 11, 2026
To use a key type that is:
- supported by all backends.
- can be generated with the most recent `ssh-keygen` version.
- here to stay for the foreseeable future.
  (DSA is scheduled for removal from the libssh2 codebase.)

Cherry-picked from #2598

Closes #2604
@vszakats
vszakats force-pushed the drop-dsa branch 3 times, most recently from b53668e to 1ae2aaa Compare September 13, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants