Skip to content

wolfssl: fix detecting ECDSA support - #1723

Closed
vszakats wants to merge 2 commits into
libssh2:masterfrom
vszakats:wolfsslubu
Closed

vszakats wants to merge 2 commits into
libssh2:masterfrom
vszakats:wolfsslubu

Conversation

@vszakats

@vszakats vszakats commented Oct 13, 2025 •

Copy link
Copy Markdown
Member

Use HAVE_ECC as an indicator for ECDSA when building with wolfSSL.

Before this patch the OpenSSL macros were used, in particular
OPENSSL_NO_EC, which made ECDSA support disabled with certain
wolfSSL build configurations, e.g. the Ubuntu 24.04 one.

ECDSA is necessary to run tests with OpenSSH v10, e.g. on Debian Trixie.

Follow-up to b95e758 #666
Ref: #1720

@vszakats
vszakats marked this pull request as draft October 13, 2025 21:58
@vszakats vszakats changed the title wolfssl: try to enable ECDSA on stock Ubuntu wolfssl: fix detecting ECDSA Oct 13, 2025
@vszakats
vszakats marked this pull request as ready for review October 13, 2025 22:51
@vszakats vszakats changed the title wolfssl: fix detecting ECDSA wolfssl: fix detecting ECDSA support Oct 13, 2025
@vszakats vszakats closed this in b807dac Oct 13, 2025
@vszakats
vszakats deleted the wolfsslubu branch October 13, 2025 23:04
vszakats added a commit that referenced this pull request Oct 13, 2025
Tests started failing after touching `sshd_config`, which bumped
the test container from Debian Bookworm to Trixie, and openssh-server
from 9.2p1 to 10.0p1 with it. OpenSSH v10 no longer supports legacy KEX
algos `diffie-hellman-group*` and `diffie-hellman-group-exchange-*`,
making libssh2 require ECDSA or ED25519 to enable `curve25519-sha256*`
or `ecdh-sha2-*`, for the tests to succeed.

libgcrypt, stock Ubuntu wolfSSL, and WinCNG CI jobs broke.

- ED25519 is only supported with OpenSSL and LibreSSL 3.7+.
- ECDSA is supported by OpenSSL and mbedTLS (unless disabled),
  by wolfSSL in certain cases (but not on Ubuntu 24.04 with the stock
  v5.6.6 build), and by WinCNG when explicitly enabled, and targeting
  Windows 10/2016 Server.

Fixed by:

- wolfSSL support received an ECDSA detection fix, that resolved
  the issue with the stock Ubuntu builds, via:
  b807dac #1723

- WinCNG had ECDSA enabled in CI in the job running tests, via:
  0f58438 #1721

- to make CI pass, disable running tests with Libgcrypt in this patch.

An alternate option is to downgrade to Bookworm, with the undesired
effect that its openssh-server doesn't support ML-KEM and other modern
SSH features, meaning those could not be tested once implemented in
libssh2, e.g. in #1644.

Ref: https://www.openssh.com/txt/release-10.0
Ref: https://packages.debian.org/trixie/openssh-server
Ref: https://packages.debian.org/bookworm/openssh-server
Ref: https://packages.ubuntu.com/noble/libwolfssl-dev

Bug: #1718 (comment)
Follow-up to 4f9e6e0 #1718

Closes #1720
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.

1 participant