mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-05 21:54:41 +02:00
Move a variable declaration to the start of a block instead of in the
middle.
This commit is contained in:
@@ -3507,14 +3507,16 @@ static int ssl_DecodePacketInternal(const byte* packet, int length,
|
|||||||
|
|
||||||
/* Pass back Session Info after we have processed the Server Hello. */
|
/* Pass back Session Info after we have processed the Server Hello. */
|
||||||
if ((NULL != sslInfo) && (0 != session->sslServer->options.cipherSuite)) {
|
if ((NULL != sslInfo) && (0 != session->sslServer->options.cipherSuite)) {
|
||||||
|
const char* pCipher;
|
||||||
|
|
||||||
sslInfo->isValid = 1;
|
sslInfo->isValid = 1;
|
||||||
sslInfo->protocolVersionMajor = session->sslServer->version.major;
|
sslInfo->protocolVersionMajor = session->sslServer->version.major;
|
||||||
sslInfo->protocolVersionMinor = session->sslServer->version.minor;
|
sslInfo->protocolVersionMinor = session->sslServer->version.minor;
|
||||||
sslInfo->serverCipherSuite0 = session->sslServer->options.cipherSuite0;
|
sslInfo->serverCipherSuite0 = session->sslServer->options.cipherSuite0;
|
||||||
sslInfo->serverCipherSuite = session->sslServer->options.cipherSuite;
|
sslInfo->serverCipherSuite = session->sslServer->options.cipherSuite;
|
||||||
|
|
||||||
const char* pCipher = wolfSSL_get_cipher(session->sslServer);
|
pCipher = wolfSSL_get_cipher(session->sslServer);
|
||||||
if (pCipher)
|
if (NULL != pCipher)
|
||||||
XMEMCPY(sslInfo->serverCipherSuiteName, pCipher,
|
XMEMCPY(sslInfo->serverCipherSuiteName, pCipher,
|
||||||
sizeof(sslInfo->serverCipherSuiteName) - 1);
|
sizeof(sslInfo->serverCipherSuiteName) - 1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user