partly import changes from tenfourfox:

- #627: M1631583 M1631597 M1636771 M1637222 M1649316 M1651520 (2373458b5)
- #627: M1631573 (0abd0fc5d)
This commit is contained in:
roytam1 2020-10-09 21:23:26 +08:00
commit 75e16e5121
10 changed files with 31511 additions and 31 deletions

View file

@ -6677,7 +6677,7 @@ ssl_CheckServerSessionIdCorrectness(sslSocket *ss, SECItem *sidBytes)
* fake. Check for the real value. */
if (sentRealSid) {
sidMatch = (sidBytes->len == sid->u.ssl3.sessionIDLength) &&
PORT_Memcmp(sid->u.ssl3.sessionID, sidBytes->data, sidBytes->len) == 0;
(!sidBytes->len || PORT_Memcmp(sid->u.ssl3.sessionID, sidBytes->data, sidBytes->len) == 0);
} else {
/* Otherwise, the session ID was a fake if TLS 1.3 compat mode is
* enabled. If so, check for the fake value. */