Skip to content

DoAsn1Key now fails when WOLFSSH_NO_RSA is defined - #808

Merged
ejohnstown merged 1 commit into
wolfSSL:masterfrom
gojimmypi:pr-DoAsn1Key-RSA-check
Jun 11, 2025
Merged

DoAsn1Key now fails when WOLFSSH_NO_RSA is defined#808
ejohnstown merged 1 commit into
wolfSSL:masterfrom
gojimmypi:pr-DoAsn1Key-RSA-check

Conversation

@gojimmypi

Copy link
Copy Markdown
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.

Comment threadsrc/ssh.c Outdated
Comment threadsrc/ssh.c Outdated
@gojimmypi
gojimmypiforce-pushed the pr-DoAsn1Key-RSA-check branch from f524634 to 429cf16CompareJune 11, 2025 21:25
@ejohnstown
ejohnstown merged commit 35a24e3 into wolfSSL:masterJun 11, 2025
Sign up for freeto 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

@gojimmypi@ejohnstown@dgarske@wolfSSL-Bot