forked from wolfSSL/wolfssl
Fix for "expression must have a constant value" in tls13.c with GreenHills compiler.
This commit is contained in:
@ -3655,7 +3655,10 @@ static int SetupPskKey(WOLFSSL* ssl, PreSharedKey* psk, int clientHello)
|
|||||||
ssl->options.cipherSuite = psk->cipherSuite;
|
ssl->options.cipherSuite = psk->cipherSuite;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
byte pskCS[2] = { psk->cipherSuite0, psk->cipherSuite };
|
byte pskCS[2];
|
||||||
|
pskCS[0] = psk->cipherSuite0;
|
||||||
|
pskCS[1] = psk->cipherSuite;
|
||||||
|
|
||||||
/* Ensure PSK and negotiated cipher suites have same hash. */
|
/* Ensure PSK and negotiated cipher suites have same hash. */
|
||||||
if (SuiteMac(pskCS) != SuiteMac(suite)) {
|
if (SuiteMac(pskCS) != SuiteMac(suite)) {
|
||||||
WOLFSSL_ERROR_VERBOSE(PSK_KEY_ERROR);
|
WOLFSSL_ERROR_VERBOSE(PSK_KEY_ERROR);
|
||||||
|
Reference in New Issue
Block a user