Skip to content

Commit 64de7a2

Browse files
committed
Fix gating
1 parent d4a6cf8 commit 64de7a2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/keygen.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ int wolfSSH_MakeEcdsaKey(byte* out, word32 outSz, word32 size)
189189

190190
int wolfSSH_MakeEd25519Key(byte* out, word32 outSz, word32 size)
191191
{
192-
#ifndef WOLFSSH_NO_ED25519
192+
#if !defined(WOLFSSH_NO_ED25519) && defined(HAVE_ED25519) && \
193+
defined(HAVE_ED25519_MAKE_KEY) && defined(HAVE_ED25519_KEY_EXPORT)
193194

194195
int ret = WS_SUCCESS;
195196
WC_RNG rng;

tests/unit.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ static int test_EcdsaKeyGen(void)
264264
}
265265
#endif
266266

267-
#ifndef WOLFSSH_NO_ED25519
267+
#if !defined(WOLFSSH_NO_ED25519) && defined(HAVE_ED25519) && \
268+
defined(HAVE_ED25519_MAKE_KEY) && defined(HAVE_ED25519_KEY_EXPORT)
268269
static int test_Ed25519KeyGen(void)
269270
{
270271
int result = 0;
@@ -365,7 +366,8 @@ int wolfSSH_UnitTest(int argc, char** argv)
365366
printf("EcdsaKeyGen: %s\n", (unitResult == 0 ? "SUCCESS" : "FAILED"));
366367
testResult = testResult || unitResult;
367368
#endif
368-
#ifndef WOLFSSH_NO_ED25519
369+
#if !defined(WOLFSSH_NO_ED25519) && defined(HAVE_ED25519) && \
370+
defined(HAVE_ED25519_MAKE_KEY) && defined(HAVE_ED25519_KEY_EXPORT)
369371
unitResult = test_Ed25519KeyGen();
370372
printf("Ed25519KeyGen: %s\n", (unitResult == 0 ? "SUCCESS" : "FAILED"));
371373
testResult = testResult || unitResult;

0 commit comments

Comments
 (0)