forked from wolfSSL/wolfssl
account for 8k keys with MySQL compatibility
This commit is contained in:
@ -1043,7 +1043,7 @@ top:
|
||||
|
||||
/* if not zero goto step 4 */
|
||||
if (mp_iszero (&u) == MP_NO) {
|
||||
if (++loop_check > 4096) {
|
||||
if (++loop_check > MAX_INVMOD_SZ) {
|
||||
res = MP_VAL;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
@ -230,6 +230,14 @@ typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat);
|
||||
#define PRIME_SIZE 256
|
||||
#endif
|
||||
|
||||
#ifndef MAX_INVMOD_SZ
|
||||
#if defined(WOLFSSL_MYSQL_COMPATIBLE)
|
||||
#define MAX_INVMOD_SZ 8192
|
||||
#else
|
||||
#define MAX_INVMOD_SZ 4096
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define mp_prime_random(a, t, size, bbs, cb, dat) \
|
||||
mp_prime_random_ex(a, t, ((size) * 8) + 1, (bbs==1)?LTM_PRIME_BBS:0, cb, dat)
|
||||
|
||||
|
Reference in New Issue
Block a user