forked from wolfSSL/wolfssl
DoServerKeyExchange var cleanup
This commit is contained in:
@@ -3932,19 +3932,16 @@ int SetCipherList(SSL_CTX* ctx, const char* list)
|
|||||||
static int DoServerKeyExchange(SSL* ssl, const byte* input,
|
static int DoServerKeyExchange(SSL* ssl, const byte* input,
|
||||||
word32* inOutIdx)
|
word32* inOutIdx)
|
||||||
{
|
{
|
||||||
word16 sigLen;
|
#if defined(OPENSSL_EXTRA) || defined(HAVE_ECC)
|
||||||
word16 verifySz;
|
word16 length = 0;
|
||||||
word16 length = 0;
|
word16 sigLen = 0;
|
||||||
byte* signature;
|
word16 verifySz = (word16)*inOutIdx; /* keep start idx */
|
||||||
|
byte* signature = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
(void)length;
|
|
||||||
(void)ssl;
|
(void)ssl;
|
||||||
(void)input;
|
(void)input;
|
||||||
sigLen = 0;
|
(void)inOutIdx;
|
||||||
signature = 0;
|
|
||||||
|
|
||||||
/* keep start idx */
|
|
||||||
verifySz = (word16)*inOutIdx;
|
|
||||||
|
|
||||||
#ifdef CYASSL_CALLBACKS
|
#ifdef CYASSL_CALLBACKS
|
||||||
if (ssl->hsInfoOn)
|
if (ssl->hsInfoOn)
|
||||||
@@ -3955,15 +3952,16 @@ int SetCipherList(SSL_CTX* ctx, const char* list)
|
|||||||
|
|
||||||
#ifndef NO_PSK
|
#ifndef NO_PSK
|
||||||
if (ssl->specs.kea == psk_kea) {
|
if (ssl->specs.kea == psk_kea) {
|
||||||
ato16(&input[*inOutIdx], &length);
|
word16 pskLen = 0;
|
||||||
|
ato16(&input[*inOutIdx], &pskLen);
|
||||||
*inOutIdx += LENGTH_SZ;
|
*inOutIdx += LENGTH_SZ;
|
||||||
XMEMCPY(ssl->arrays.server_hint, &input[*inOutIdx],
|
XMEMCPY(ssl->arrays.server_hint, &input[*inOutIdx],
|
||||||
min(length, MAX_PSK_ID_LEN));
|
min(pskLen, MAX_PSK_ID_LEN));
|
||||||
if (length < MAX_PSK_ID_LEN)
|
if (pskLen < MAX_PSK_ID_LEN)
|
||||||
ssl->arrays.server_hint[length] = 0;
|
ssl->arrays.server_hint[pskLen] = 0;
|
||||||
else
|
else
|
||||||
ssl->arrays.server_hint[MAX_PSK_ID_LEN - 1] = 0;
|
ssl->arrays.server_hint[MAX_PSK_ID_LEN - 1] = 0;
|
||||||
*inOutIdx += length;
|
*inOutIdx += pskLen;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user