forked from wolfSSL/wolfssl
reduce client key exchange stack use in non NTRU mode
This commit is contained in:
@@ -474,6 +474,14 @@ enum Misc {
|
||||
};
|
||||
|
||||
|
||||
/* don't use extra 3/4k stack space unless need to */
|
||||
#ifdef HAVE_NTRU
|
||||
#define MAX_ENCRYPT_SZ MAX_NTRU_ENCRYPT_SZ
|
||||
#else
|
||||
#define MAX_ENCRYPT_SZ ENCRYPT_LEN
|
||||
#endif
|
||||
|
||||
|
||||
/* states */
|
||||
enum states {
|
||||
NULL_STATE = 0,
|
||||
|
@@ -5088,7 +5088,7 @@ int SetCipherList(Suites* s, const char* list)
|
||||
|
||||
int SendClientKeyExchange(CYASSL* ssl)
|
||||
{
|
||||
byte encSecret[MAX_NTRU_ENCRYPT_SZ];
|
||||
byte encSecret[MAX_ENCRYPT_SZ];
|
||||
word32 encSz = 0;
|
||||
word32 idx = 0;
|
||||
int ret = 0;
|
||||
|
Reference in New Issue
Block a user