forked from wolfSSL/wolfssl
Fix for sniffer async issue with TLS v1.3.
This commit is contained in:
@ -4398,7 +4398,11 @@ static int DoHandShake(const byte* input, int* sslBytes,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WOLFSSL_TLS13
|
#ifdef WOLFSSL_TLS13
|
||||||
if (type != client_hello && type != server_hello) {
|
if (type != client_hello && type != server_hello
|
||||||
|
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||||
|
&& session->sslServer->error != WC_PENDING_E
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
/* For resumption the hash is before / after client_hello PSK binder */
|
/* For resumption the hash is before / after client_hello PSK binder */
|
||||||
/* hash the packet including header */
|
/* hash the packet including header */
|
||||||
/* TLS v1.3 requires the hash for the handshake and transfer key derivation */
|
/* TLS v1.3 requires the hash for the handshake and transfer key derivation */
|
||||||
|
@ -158,7 +158,7 @@ int BuildTlsHandshakeHash(WOLFSSL* ssl, byte* hash, word32* hashLen)
|
|||||||
|
|
||||||
*hashLen = hashSz;
|
*hashLen = hashSz;
|
||||||
#ifdef WOLFSSL_CHECK_MEM_ZERO
|
#ifdef WOLFSSL_CHECK_MEM_ZERO
|
||||||
wc_MemZero_Add("TLS hasndshake hash", hash, hashSz);
|
wc_MemZero_Add("TLS handshake hash", hash, hashSz);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
|
@ -827,7 +827,7 @@ int main(int argc, char** argv)
|
|||||||
/* grab next pcap packet */
|
/* grab next pcap packet */
|
||||||
packetNumber++;
|
packetNumber++;
|
||||||
packet = pcap_next(pcap, &header);
|
packet = pcap_next(pcap, &header);
|
||||||
#ifdef QAT_DEBUG
|
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(DEBUG_SNIFFER)
|
||||||
printf("Packet Number: %d\n", packetNumber);
|
printf("Packet Number: %d\n", packetNumber);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user