From 49e5d8efea426afb84ebe922e99bfb2d830b68e1 Mon Sep 17 00:00:00 2001 From: Ethan Looney Date: Wed, 5 Aug 2020 12:31:50 -0700 Subject: [PATCH] Added additional ifdef's to Ed25519 functions and cast derSz to word32 --- tests/api.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/api.c b/tests/api.c index ed80078a9..f87238864 100644 --- a/tests/api.c +++ b/tests/api.c @@ -20716,7 +20716,8 @@ static int test_wc_EccPrivateKeyToDer (void) static int test_wc_Ed25519KeyToDer (void) { int ret = 0; -#if defined(HAVE_ED25519) +#if defined(HAVE_ED25519) && (defined(WOLFSSL_CERT_GEN) || \ + defined(WOLFSSL_KEY_GEN)) byte output[FOURK_BUF]; ed25519_key ed25519Key; @@ -20780,7 +20781,8 @@ static int test_wc_Ed25519KeyToDer (void) static int test_wc_Ed25519PrivateKeyToDer (void) { int ret = 0; -#if defined(HAVE_ED25519) +#if defined(HAVE_ED25519) && (defined(WOLFSSL_CERT_GEN) || \ + defined(WOLFSSL_KEY_GEN)) byte output[FOURK_BUF]; ed25519_key ed25519PrivKey; @@ -20991,7 +20993,7 @@ static int test_wc_SetSubjectBuffer (void) if (ret == 0) { file = XFOPEN("./certs/ca-cert.der", "rb"); if (file != NULL) { - derSz = XFREAD(der, 1, FOURK_BUF, file); + derSz = (word32)XFREAD(der, 1, FOURK_BUF, file); XFCLOSE(file); } }