Skip to content

Commit f6726ab

Browse files
add check for HAVE_ALL_CURVES macro
1 parent e4356dd commit f6726ab

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

wolfssh/internal.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,14 @@ extern "C" {
154154
#define WOLFSSH_NO_ECDH_SHA2_NISTP256
155155
#endif
156156
#if defined(WOLFSSH_NO_ECDH) \
157-
|| !defined(WOLFSSL_SHA384) || !defined(HAVE_ECC384)
157+
|| !defined(WOLFSSL_SHA384) || \
158+
(!defined(HAVE_ECC384) && !defined(HAVE_ALL_CURVES))
158159
#undef WOLFSSH_NO_ECDH_SHA2_NISTP384
159160
#define WOLFSSH_NO_ECDH_SHA2_NISTP384
160161
#endif
161162
#if defined(WOLFSSH_NO_ECDH) \
162-
|| !defined(WOLFSSL_SHA512) || !defined(HAVE_ECC521)
163+
|| !defined(WOLFSSL_SHA512) || \
164+
(!defined(HAVE_ECC521) && !defined(HAVE_ALL_CURVES))
163165
#undef WOLFSSH_NO_ECDH_SHA2_NISTP521
164166
#define WOLFSSH_NO_ECDH_SHA2_NISTP521
165167
#endif
@@ -218,12 +220,14 @@ extern "C" {
218220
#define WOLFSSH_NO_ECDSA_SHA2_NISTP256
219221
#endif
220222
#if defined(WOLFSSH_NO_ECDSA) || \
221-
!defined(WOLFSSL_SHA384) || !defined(HAVE_ECC384)
223+
!defined(WOLFSSL_SHA384) || \
224+
(!defined(HAVE_ECC384) && !defined(HAVE_ALL_CURVES))
222225
#undef WOLFSSH_NO_ECDSA_SHA2_NISTP384
223226
#define WOLFSSH_NO_ECDSA_SHA2_NISTP384
224227
#endif
225228
#if defined(WOLFSSH_NO_ECDSA) || \
226-
!defined(WOLFSSL_SHA512) || !defined(HAVE_ECC521)
229+
!defined(WOLFSSL_SHA512) || \
230+
(!defined(HAVE_ECC521) && !defined(HAVE_ALL_CURVES))
227231
#undef WOLFSSH_NO_ECDSA_SHA2_NISTP521
228232
#define WOLFSSH_NO_ECDSA_SHA2_NISTP521
229233
#endif

0 commit comments

Comments
 (0)