Fix building with NO_ECC_KEY_EXPORT.

This commit is contained in:
Kareem
2021-11-03 16:03:26 -07:00
parent 7e01af0121
commit 60a86157c7
3 changed files with 3 additions and 5 deletions

View File

@@ -6486,7 +6486,7 @@ static int TLSX_KeyShare_GenX448Key(WOLFSSL *ssl, KeyShareEntry* kse)
static int TLSX_KeyShare_GenEccKey(WOLFSSL *ssl, KeyShareEntry* kse)
{
int ret = 0;
#ifdef HAVE_ECC
#if defined(HAVE_ECC) && defined(HAVE_ECC_KEY_EXPORT)
word32 keySize = 0;
word16 curveId = ECC_CURVE_INVALID;
ecc_key* eccKey = (ecc_key*)kse->key;
@@ -6611,7 +6611,7 @@ static int TLSX_KeyShare_GenEccKey(WOLFSSL *ssl, KeyShareEntry* kse)
(void)kse;
ret = NOT_COMPILED_IN;
#endif /* HAVE_ECC */
#endif /* HAVE_ECC && HAVE_ECC_KEY_EXPORT */
return ret;
}

View File

@@ -26293,7 +26293,7 @@ static int test_ToTraditional (void)
static int test_wc_EccPrivateKeyToDer (void)
{
int ret = 0;
#if defined(HAVE_ECC) && !defined(WC_NO_RNG)
#if defined(HAVE_ECC) && defined(HAVE_ECC_KEY_EXPORT) && !defined(WC_NO_RNG)
byte output[ONEK_BUF];
ecc_key eccKey;

View File

@@ -21468,9 +21468,7 @@ static int ecc_test_make_pub(WC_RNG* rng)
byte tmp[ECC_BUFSIZE];
#endif
const byte* msg = (const byte*)"test wolfSSL ECC public gen";
#if defined(HAVE_ECC_KEY_EXPORT)
word32 x;
#endif
word32 tmpSz;
int ret = 0;
ecc_point* pubPoint = NULL;