Merge pull request #1341 from JacobBarthelmeh/master

fix build for OLD_HELLO_ALLOWED macro
This commit is contained in:
toddouska 2018-02-02 10:53:16 -08:00 committed by GitHub
commit 7ad0ea808c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -22720,6 +22720,8 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (ssl->version.minor > pv.minor) {
byte haveRSA = 0;
byte havePSK = 0;
int keySz = 0;
if (!ssl->options.downgrade) {
WOLFSSL_MSG("Client trying to connect with lesser version");
return VERSION_ERROR;
@ -22755,8 +22757,11 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#ifndef NO_PSK
havePSK = ssl->options.havePSK;
#endif
#ifndef NO_CERTS
keySz = ssl->buffers.keySz;
#endif
InitSuites(ssl->suites, ssl->version, ssl->keySz, haveRSA, havePSK,
InitSuites(ssl->suites, ssl->version, keySz, haveRSA, havePSK,
ssl->options.haveDH, ssl->options.haveNTRU,
ssl->options.haveECDSAsig, ssl->options.haveECC,
ssl->options.haveStaticECC, ssl->options.side);

View File

@ -5474,6 +5474,7 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
if (ssl && resetSuites) {
word16 havePSK = 0;
word16 haveRSA = 0;
int keySz = 0;
#ifndef NO_PSK
if (ssl->options.havePSK) {
@ -5483,9 +5484,12 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
#ifndef NO_RSA
haveRSA = 1;
#endif
#ifndef NO_CERTS
keySz = ssl->buffers.keySz;
#endif
/* let's reset suites */
InitSuites(ssl->suites, ssl->version, ssl->buffers.keySz, haveRSA,
InitSuites(ssl->suites, ssl->version, keySz, haveRSA,
havePSK, ssl->options.haveDH, ssl->options.haveNTRU,
ssl->options.haveECDSAsig, ssl->options.haveECC,
ssl->options.haveStaticECC, ssl->options.side);