diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index a3bb97712..27732af5a 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -19935,8 +19935,8 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount, DECLARE_VAR(sharedB, byte, ECC_SHARED_SIZE, HEAP_HINT); #endif #ifdef HAVE_ECC_KEY_EXPORT - static const size_t exportBufSize = MAX_ECC_BYTES * 2 + 32; - DECLARE_VAR(exportBuf, byte, exportBufSize, HEAP_HINT); + #define ECC_KEY_EXPORT_BUF_SIZE (MAX_ECC_BYTES * 2 + 32) + DECLARE_VAR(exportBuf, byte, ECC_KEY_EXPORT_BUF_SIZE, HEAP_HINT); #endif word32 x = 0; #if (defined(HAVE_ECC_DHE) || defined(HAVE_ECC_CDH)) && \ @@ -20142,7 +20142,7 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount, #endif /* WOLFSSL_ATECC508A */ #ifdef HAVE_ECC_KEY_EXPORT - x = exportBufSize; + x = ECC_KEY_EXPORT_BUF_SIZE; ret = wc_ecc_export_x963_ex(userA, exportBuf, &x, 0); if (ret != 0) goto done; @@ -20178,7 +20178,7 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount, #ifdef HAVE_COMP_KEY /* try compressed export / import too */ - x = exportBufSize; + x = ECC_KEY_EXPORT_BUF_SIZE; ret = wc_ecc_export_x963_ex(userA, exportBuf, &x, 1); if (ret != 0) goto done; @@ -20301,7 +20301,7 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount, #if defined(HAVE_ECC_KEY_EXPORT) && !defined(WOLFSSL_ATECC508) && \ !defined(WOLFSSL_ATECC608A) - x = exportBufSize; + x = ECC_KEY_EXPORT_BUF_SIZE; ret = wc_ecc_export_private_only(userA, exportBuf, &x); if (ret != 0) goto done;