Fix for building only curve small and ed disabled. Fix for client assuming supported curves is enabled with curve.

This commit is contained in:
David Garske
2017-06-16 16:17:01 -07:00
parent 3c173ba366
commit ee83710a0a
2 changed files with 6 additions and 3 deletions

View File

@@ -1559,7 +1559,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
err_sys("DisableExtendedMasterSecret failed");
}
#endif
#ifdef HAVE_CURVE25519
#if defined(HAVE_CURVE25519) && defined(HAVE_SUPPORTED_CURVES)
if (useX25519) {
if (wolfSSL_CTX_UseSupportedCurve(ctx, WOLFSSL_ECC_X25519)
!= SSL_SUCCESS) {
@@ -1570,7 +1570,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
err_sys("unable to support secp256r1");
}
}
#endif
#endif /* HAVE_CURVE25519 && HAVE_SUPPORTED_CURVES */
if (benchmark) {
((func_args*)args)->return_code =

View File

@@ -89,10 +89,13 @@ WOLFSSL_LOCAL void fe_mul121666(fe,fe);
WOLFSSL_LOCAL void fe_cmov(fe,const fe, int);
WOLFSSL_LOCAL void fe_pow22523(fe,const fe);
#if defined(HAVE___UINT128_T)
/* 64 type needed for SHA512 */
WOLFSSL_LOCAL uint64_t load_3(const unsigned char *in);
WOLFSSL_LOCAL uint64_t load_4(const unsigned char *in);
#endif /* !CURVE25519_SMALL */
#endif
#endif /* !CURVE25519_SMALL || !ED25519_SMALL */
/* Use less memory and only 32bit types or less, but is slower
Based on Daniel Beer's public domain work. */