fix build for OLD_HELLO_ALLOWED macro

pull/1341/head
Jacob Barthelmeh 2018-01-29 14:55:32 -07:00
parent d179e442b4
commit 580a55ce49
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);