Skip to content

Conversation

@gojimmypi
Copy link
Contributor

Updates ssh.c to fix compile-time error when RSA is disabled.

Without this fix, this line in DoAsn1Key():

        ret = wc_RsaFlattenPublicKey(&key->ks.rsa.key, (byte*)&e, &eSz, n, &nSz);

fails to compile as there's no .rsa.key member property:

Severity Description                                   Project                File                                         Line
Error    'union <anonymous>' has no member named 'rsa' wolfssl_IDF_v5.2_ESP32 C:\workspace\wolfssh-master-update\src\ssh.c 1751

With this PR, the code compiles and exits IdentifyAsn1Key() with error code WS_RSA_E and a message when debugging is enabled.

@gojimmypi gojimmypi requested review from dgarske and ejohnstown June 9, 2025 21:10
@dgarske dgarske removed their assignment Jun 9, 2025
@dgarske dgarske removed their request for review June 9, 2025 21:12
@gojimmypi gojimmypi force-pushed the pr-DoAsn1Key-RSA-check branch from f524634 to 429cf16 Compare June 11, 2025 21:25
@ejohnstown ejohnstown merged commit 35a24e3 into wolfSSL:master Jun 11, 2025
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants