forked from wolfSSL/wolfssl
test.c:ecc_test_curve_size(): use a macro, not a static const size_t, for size of exportBuf, to make MS Visual Studio happy.
This commit is contained in:
@ -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);
|
DECLARE_VAR(sharedB, byte, ECC_SHARED_SIZE, HEAP_HINT);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ECC_KEY_EXPORT
|
#ifdef HAVE_ECC_KEY_EXPORT
|
||||||
static const size_t exportBufSize = MAX_ECC_BYTES * 2 + 32;
|
#define ECC_KEY_EXPORT_BUF_SIZE (MAX_ECC_BYTES * 2 + 32)
|
||||||
DECLARE_VAR(exportBuf, byte, exportBufSize, HEAP_HINT);
|
DECLARE_VAR(exportBuf, byte, ECC_KEY_EXPORT_BUF_SIZE, HEAP_HINT);
|
||||||
#endif
|
#endif
|
||||||
word32 x = 0;
|
word32 x = 0;
|
||||||
#if (defined(HAVE_ECC_DHE) || defined(HAVE_ECC_CDH)) && \
|
#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 */
|
#endif /* WOLFSSL_ATECC508A */
|
||||||
|
|
||||||
#ifdef HAVE_ECC_KEY_EXPORT
|
#ifdef HAVE_ECC_KEY_EXPORT
|
||||||
x = exportBufSize;
|
x = ECC_KEY_EXPORT_BUF_SIZE;
|
||||||
ret = wc_ecc_export_x963_ex(userA, exportBuf, &x, 0);
|
ret = wc_ecc_export_x963_ex(userA, exportBuf, &x, 0);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
goto done;
|
goto done;
|
||||||
@ -20178,7 +20178,7 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount,
|
|||||||
|
|
||||||
#ifdef HAVE_COMP_KEY
|
#ifdef HAVE_COMP_KEY
|
||||||
/* try compressed export / import too */
|
/* try compressed export / import too */
|
||||||
x = exportBufSize;
|
x = ECC_KEY_EXPORT_BUF_SIZE;
|
||||||
ret = wc_ecc_export_x963_ex(userA, exportBuf, &x, 1);
|
ret = wc_ecc_export_x963_ex(userA, exportBuf, &x, 1);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
goto done;
|
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) && \
|
#if defined(HAVE_ECC_KEY_EXPORT) && !defined(WOLFSSL_ATECC508) && \
|
||||||
!defined(WOLFSSL_ATECC608A)
|
!defined(WOLFSSL_ATECC608A)
|
||||||
x = exportBufSize;
|
x = ECC_KEY_EXPORT_BUF_SIZE;
|
||||||
ret = wc_ecc_export_private_only(userA, exportBuf, &x);
|
ret = wc_ecc_export_private_only(userA, exportBuf, &x);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
Reference in New Issue
Block a user