wolfSSL / wolfssh

wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
https://www.wolfssl.com
367 stars 88 forks source link

Error when building wolfssh with only WOLFSSH_NO_ECDSA or WOLFSSH_NO_ECDH #679

Closed oleg35hp closed 3 months ago

oleg35hp commented 4 months ago

wolfssh/internal.h:598

#if !defined(WOLFSSH_NO_ECDSA) && !defined(WOLFSSH_NO_ECDH)
        ecc_key ecc;
#endif

should be

#if !defined(WOLFSSH_NO_ECDSA) || !defined(WOLFSSH_NO_ECDH)
        ecc_key ecc;
#endif
ejohnstown commented 4 months ago

I'm taking a look at this. I see a few inconsistencies and errors in the preprocessor guards. Thanks for the feedback.

ejohnstown commented 4 months ago

The actual solution is to check for #ifndef WOLFSSH_NO_ECDH. I have a fix in the works, and I'll link it where when it is a PR.