mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
Move some stats captures to a different location.
This commit is contained in:
@@ -3832,18 +3832,24 @@ doMessage:
|
|||||||
SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
|
SetError(MEMORY_STR, error, session, FATAL_ERROR_STATE);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#ifdef WOLFSSL_SNIFFER_STATS
|
|
||||||
LOCK_STAT();
|
|
||||||
NOLOCK_INC_STAT(SnifferStats.sslDecryptedPackets);
|
|
||||||
NOLOCK_ADD_TO_STAT(SnifferStats.sslDecryptedBytes, sslBytes);
|
|
||||||
UNLOCK_STAT();
|
|
||||||
#endif
|
|
||||||
sslFrame = DecryptMessage(ssl, sslFrame, rhSize,
|
sslFrame = DecryptMessage(ssl, sslFrame, rhSize,
|
||||||
ssl->buffers.outputBuffer.buffer, &errCode,
|
ssl->buffers.outputBuffer.buffer, &errCode,
|
||||||
&ivAdvance);
|
&ivAdvance);
|
||||||
recordEnd = sslFrame - ivAdvance + rhSize; /* sslFrame moved so
|
recordEnd = sslFrame - ivAdvance + rhSize; /* sslFrame moved so
|
||||||
should recordEnd */
|
should recordEnd */
|
||||||
decrypted = 1;
|
decrypted = 1;
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_SNIFFER_STATS
|
||||||
|
if (errCode != 0) {
|
||||||
|
INC_STAT(SnifferStats.sslKeyFails);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LOCK_STAT();
|
||||||
|
NOLOCK_INC_STAT(SnifferStats.sslDecryptedPackets);
|
||||||
|
NOLOCK_ADD_TO_STAT(SnifferStats.sslDecryptedBytes, sslBytes);
|
||||||
|
UNLOCK_STAT();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (errCode != 0) {
|
if (errCode != 0) {
|
||||||
SetError(BAD_DECRYPT, error, session, FATAL_ERROR_STATE);
|
SetError(BAD_DECRYPT, error, session, FATAL_ERROR_STATE);
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user