Closed
Bug 649927
Opened 14 years ago
Closed 2 years ago
possible error in Statistics calculation in case code goes to else loop
Categories
(NSS :: Libraries, defect, P5)
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: u238590, Unassigned)
Details
Server when parses a parses session ticket sent by the client, it sets
statelessResume to true.
882 SECStatus
883 ssl3_ServerHandleSessionTicketXtn(sslSocket *ss, PRUint16 ex_type,
884 SECItem *data)
885 {
...
1258 ss->statelessResume = PR_TRUE;
http://mxr.mozilla.org/mozilla/source/security/nss/lib/ssl/ssl3con.c#6136
5966 static SECStatus
5967 ssl3_HandleClientHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length)
5968 {
...
6136 } else if (ss->statelessResume) {
6137 /* Fill in the client's session ID if doing a stateless resume.
6138 * (When doing stateless resumes, server echos client's SessionID.)
6139 */
6140 sid = ss->sec.ci.sid;
6141 PORT_Assert(sid != NULL); /* Should have already been filled in.*/
6142
6143 if (sidBytes.len > 0 && sidBytes.len <= SSL3_SESSIONID_BYTES) {
6144 sid->u.ssl3.sessionIDLength = sidBytes.len;
6145 PORT_Memcpy(sid->u.ssl3.sessionID, sidBytes.data,
6146 sidBytes.len);
6147 sid->u.ssl3.sessionIDLength = sidBytes.len;
-> Nit this is same as line #6144
6148 } else {
6149 sid->u.ssl3.sessionIDLength = 0;
Should we set ss->statelessResume = PR_FALSE; here?
6150 }
...
This "statelessResume" is used to log statistics later :
6403 SSL_AtomicIncrementLong(& ssl3stats.hch_sid_cache_hits );
6404 if (ss->statelessResume)
6405 SSL_AtomicIncrementLong(& ssl3stats.hch_sid_stateless_resumes );
Updated•3 years ago
|
Severity: minor → S4
Updated•2 years ago
|
Status: NEW → RESOLVED
Closed: 2 years ago
Priority: -- → P5
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•