Skip to content

Commit 104f685

Browse files
authored
Merge pull request #10948 from SparkiDev/ed25519_fixes_2
Ed25519 tests: Fix to pass regression testing
2 parents 69eb81a + 07353cc commit 104f685

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/api/test_ed25519.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ int test_wc_Ed25519PublicKeyToDer(void)
554554
{
555555
EXPECT_DECLS;
556556
#if defined(HAVE_ED25519) && defined(HAVE_ED25519_KEY_EXPORT) && \
557+
defined(HAVE_ED25519_MAKE_KEY) && \
557558
(defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_KEY_GEN))
558559
ed25519_key key;
559560
byte derBuf[1024];
@@ -611,6 +612,7 @@ int test_wc_Ed25519KeyToDer(void)
611612
{
612613
EXPECT_DECLS;
613614
#if defined(HAVE_ED25519) && defined(HAVE_ED25519_KEY_EXPORT) && \
615+
defined(HAVE_ED25519_MAKE_KEY) && \
614616
(defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_KEY_GEN))
615617
byte output[ONEK_BUF];
616618
ed25519_key ed25519Key;
@@ -651,6 +653,7 @@ int test_wc_Ed25519PrivateKeyToDer(void)
651653
{
652654
EXPECT_DECLS;
653655
#if defined(HAVE_ED25519) && defined(HAVE_ED25519_KEY_EXPORT) && \
656+
defined(HAVE_ED25519_MAKE_KEY) && \
654657
(defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_KEY_GEN))
655658
byte output[ONEK_BUF];
656659
ed25519_key ed25519PrivKey;
@@ -690,7 +693,8 @@ int test_wc_Ed25519KeyToDer_oneasymkey_version(void)
690693
{
691694
EXPECT_DECLS;
692695
#if defined(HAVE_ED25519) && defined(HAVE_ED25519_KEY_EXPORT) && \
693-
defined(HAVE_ED25519_KEY_IMPORT) && defined(WOLFSSL_KEY_GEN)
696+
defined(HAVE_ED25519_KEY_IMPORT) && defined(HAVE_ED25519_MAKE_KEY) && \
697+
defined(WOLFSSL_KEY_GEN)
694698
ed25519_key key;
695699
ed25519_key key2;
696700
WC_RNG rng;
@@ -1308,7 +1312,7 @@ int test_wc_ed25519_import_variants(void)
13081312
wc_ed25519_free(&privKey);
13091313
}
13101314

1311-
#ifdef HAVE_ED25519_KEY_EXPORT
1315+
#if defined(HAVE_ED25519_KEY_EXPORT) && defined(HAVE_ED25519_MAKE_KEY)
13121316
/* wc_ed25519_import_private_key_ex: pub==NULL branch. */
13131317
{
13141318
WC_RNG rng;

0 commit comments

Comments
 (0)