mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Sniffer Stats
Moved the increment of the resume misses statistic.
This commit is contained in:
@ -2093,11 +2093,6 @@ static int ProcessServerHello(int msgSz, const byte* input, int* sslBytes,
|
|||||||
if (XMEMCMP(session->sslServer->arrays->sessionID,
|
if (XMEMCMP(session->sslServer->arrays->sessionID,
|
||||||
session->sslClient->arrays->sessionID, ID_LEN) == 0)
|
session->sslClient->arrays->sessionID, ID_LEN) == 0)
|
||||||
doResume = 1;
|
doResume = 1;
|
||||||
else if (session->sslClient->options.haveSessionId) {
|
|
||||||
#ifdef WOLFSSL_SNIFFER_STATS
|
|
||||||
INC_STAT(SnifferStats.sslResumeMisses);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (session->sslClient->options.haveSessionId == 0 &&
|
else if (session->sslClient->options.haveSessionId == 0 &&
|
||||||
session->sslServer->options.haveSessionId == 0 &&
|
session->sslServer->options.haveSessionId == 0 &&
|
||||||
@ -2116,6 +2111,9 @@ static int ProcessServerHello(int msgSz, const byte* input, int* sslBytes,
|
|||||||
SSL_SESSION* resume = GetSession(session->sslServer,
|
SSL_SESSION* resume = GetSession(session->sslServer,
|
||||||
session->sslServer->arrays->masterSecret, 0);
|
session->sslServer->arrays->masterSecret, 0);
|
||||||
if (resume == NULL) {
|
if (resume == NULL) {
|
||||||
|
#ifdef WOLFSSL_SNIFFER_STATS
|
||||||
|
INC_STAT(SnifferStats.sslResumeMisses);
|
||||||
|
#endif
|
||||||
SetError(BAD_SESSION_RESUME_STR, error, session, FATAL_ERROR_STATE);
|
SetError(BAD_SESSION_RESUME_STR, error, session, FATAL_ERROR_STATE);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user