forked from wolfSSL/wolfssl
Skip the small key DH test for SP and FFDHE builds.
This commit is contained in:
@@ -16142,9 +16142,9 @@ static int dh_generate_test(WC_RNG *rng)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
DhKey smallKey;
|
DhKey smallKey;
|
||||||
byte p[2] = { 1, 7 }; /* 263 in decimal */
|
byte p[2] = { 0, 5 };
|
||||||
byte g[2] = { 0, 2 };
|
byte g[2] = { 0, 2 };
|
||||||
#if !defined(WOLFSSL_SP_MATH)
|
#if !defined(WOLFSSL_SP_MATH) && !defined(HAVE_FFDHE)
|
||||||
#ifdef WOLFSSL_DH_CONST
|
#ifdef WOLFSSL_DH_CONST
|
||||||
/* the table for constant DH lookup will round to the lowest byte size 21 */
|
/* the table for constant DH lookup will round to the lowest byte size 21 */
|
||||||
byte priv[21];
|
byte priv[21];
|
||||||
@@ -16192,7 +16192,7 @@ static int dh_generate_test(WC_RNG *rng)
|
|||||||
ERROR_OUT(-8017, exit_gen_test);
|
ERROR_OUT(-8017, exit_gen_test);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(WOLFSSL_SP_MATH)
|
#if !defined(WOLFSSL_SP_MATH) && !defined(HAVE_FFDHE)
|
||||||
/* Use API. */
|
/* Use API. */
|
||||||
ret = wc_DhGenerateKeyPair(&smallKey, rng, priv, &privSz, pub, &pubSz);
|
ret = wc_DhGenerateKeyPair(&smallKey, rng, priv, &privSz, pub, &pubSz);
|
||||||
#if defined(WOLFSSL_ASYNC_CRYPT)
|
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||||
|
Reference in New Issue
Block a user