internal.c: refactoring DoServerHello to reduce stack usage:
--- variable clSuites removed (sizeof(Suites) saved) ps.: TLSX_Parse() does not requires the suites parameter at client side.
This commit is contained in:
parent
a7e585b63d
commit
845e49781f
@ -9275,7 +9275,6 @@ static void PickHashSigAlgo(CYASSL* ssl,
|
|||||||
if (TLSX_SupportExtensions(ssl)) {
|
if (TLSX_SupportExtensions(ssl)) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
word16 totalExtSz;
|
word16 totalExtSz;
|
||||||
Suites clSuites; /* just for compatibility right now */
|
|
||||||
|
|
||||||
if ((i - begin) + OPAQUE16_LEN > helloSz)
|
if ((i - begin) + OPAQUE16_LEN > helloSz)
|
||||||
return BUFFER_ERROR;
|
return BUFFER_ERROR;
|
||||||
@ -9287,7 +9286,7 @@ static void PickHashSigAlgo(CYASSL* ssl,
|
|||||||
return BUFFER_ERROR;
|
return BUFFER_ERROR;
|
||||||
|
|
||||||
if ((ret = TLSX_Parse(ssl, (byte *) input + i,
|
if ((ret = TLSX_Parse(ssl, (byte *) input + i,
|
||||||
totalExtSz, 0, &clSuites)))
|
totalExtSz, 0, NULL)))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
i += totalExtSz;
|
i += totalExtSz;
|
||||||
|
@ -2149,7 +2149,7 @@ int TLSX_Parse(CYASSL* ssl, byte* input, word16 length, byte isRequest,
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
word16 offset = 0;
|
word16 offset = 0;
|
||||||
|
|
||||||
if (!ssl || !input || !suites)
|
if (!ssl || !input || (isRequest && !suites))
|
||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
|
|
||||||
while (ret == 0 && offset < length) {
|
while (ret == 0 && offset < length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user