Fix for sniffer stats on resume miss. The logic for hello_retry_request will no longer try and do resume, so restore BAD_SESSION_RESUME_STR error.

This commit is contained in:
David Garske
2021-07-08 09:31:59 -07:00
parent 26789ef877
commit ddbe0e6dab

View File

@@ -2797,11 +2797,11 @@ static int DoResume(SnifferSession* session, char* error)
session->sslServer->arrays->masterSecret, 0); session->sslServer->arrays->masterSecret, 0);
} }
if (resume == NULL) { if (resume == NULL) {
/* a session id without resume is okay with hello_retry_request */
#ifdef WOLFSSL_SNIFFER_STATS #ifdef WOLFSSL_SNIFFER_STATS
INC_STAT(SnifferStats.sslStandardConns); INC_STAT(SnifferStats.sslResumeMisses);
#endif #endif
return 0; SetError(BAD_SESSION_RESUME_STR, error, session, FATAL_ERROR_STATE);
return -1;
} }
/* make sure client has master secret too */ /* make sure client has master secret too */