mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
Sniffer Watch Mode
Added some statistics tracking to the watch mode.
This commit is contained in:
@@ -2347,9 +2347,17 @@ static int ProcessCertificate(const byte* input, int* sslBytes,
|
||||
ret = WatchCb((void*)session, digest, sizeof(digest), input, certSz,
|
||||
WatchCbCtx, error);
|
||||
if (ret != 0) {
|
||||
#ifdef WOLFSSL_SNIFFER_STATS
|
||||
INC_STAT(SnifferStats.sslKeysUnmatched);
|
||||
#endif
|
||||
SetError(WATCH_FAIL_STR, error, session, FATAL_ERROR_STATE);
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
#ifdef WOLFSSL_SNIFFER_STATS
|
||||
INC_STAT(SnifferStats.sslKeyMatches);
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user