mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
Set MAX_PRF_HALF bigger for large FFDHE parameters
Stack size measurement is in a thread - free local fp_cache
This commit is contained in:
@@ -3185,6 +3185,11 @@ exit:
|
|||||||
wolfAsync_DevClose(&devId);
|
wolfAsync_DevClose(&devId);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_ECC) && defined(FP_ECC) && defined(HAVE_THREAD_LS) \
|
||||||
|
&& defined(HAVE_STACK_SIZE)
|
||||||
|
wc_ecc_fp_free(); /* free per thread cache */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* There are use cases when these assignments are not read. To avoid
|
/* There are use cases when these assignments are not read. To avoid
|
||||||
* potential confusion those warnings have been handled here.
|
* potential confusion those warnings have been handled here.
|
||||||
*/
|
*/
|
||||||
|
@@ -2279,8 +2279,8 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
|||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
#if defined(NO_MAIN_DRIVER) && defined(HAVE_ECC) && defined(FP_ECC) \
|
#if defined(HAVE_ECC) && defined(FP_ECC) && defined(HAVE_THREAD_LS) \
|
||||||
&& defined(HAVE_THREAD_LS)
|
&& (defined(NO_MAIN_DRIVER) || defined(HAVE_STACK_SIZE))
|
||||||
wc_ecc_fp_free(); /* free per thread cache */
|
wc_ecc_fp_free(); /* free per thread cache */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -194,7 +194,13 @@ WOLFSSL_API int wc_Sha512Hash(const byte*, word32, byte*);
|
|||||||
#endif /* WOLFSSL_SHA512 */
|
#endif /* WOLFSSL_SHA512 */
|
||||||
|
|
||||||
enum max_prf {
|
enum max_prf {
|
||||||
|
#ifdef HAVE_FFDHE_8192
|
||||||
|
MAX_PRF_HALF = 512, /* Maximum half secret len */
|
||||||
|
#elif defined(HAVE_FFDHE_6144)
|
||||||
|
MAX_PRF_HALF = 384, /* Maximum half secret len */
|
||||||
|
#else
|
||||||
MAX_PRF_HALF = 256, /* Maximum half secret len */
|
MAX_PRF_HALF = 256, /* Maximum half secret len */
|
||||||
|
#endif
|
||||||
MAX_PRF_LABSEED = 128, /* Maximum label + seed len */
|
MAX_PRF_LABSEED = 128, /* Maximum label + seed len */
|
||||||
MAX_PRF_DIG = 224 /* Maximum digest len */
|
MAX_PRF_DIG = 224 /* Maximum digest len */
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user