OLD | NEW |
1 diff -pu a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c | 1 diff -pu a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c |
2 --- a/nss/lib/ssl/ssl3con.c» 2014-01-03 19:45:10.857611184 -0800 | 2 --- a/nss/lib/ssl/ssl3con.c» 2014-01-17 19:00:52.843413560 -0800 |
3 +++ b/nss/lib/ssl/ssl3con.c» 2014-01-03 19:45:18.457735467 -0800 | 3 +++ b/nss/lib/ssl/ssl3con.c» 2014-01-17 19:01:36.374129696 -0800 |
4 @@ -11318,7 +11318,7 @@ ssl3_FinishHandshake(sslSocket * ss) | 4 @@ -11318,7 +11318,7 @@ ssl3_FinishHandshake(sslSocket * ss) |
5 ss->ssl3.hs.receivedNewSessionTicket = PR_FALSE; | 5 ss->ssl3.hs.receivedNewSessionTicket = PR_FALSE; |
6 } | 6 } |
7 | 7 |
8 - if (ss->ssl3.hs.cacheSID) { | 8 - if (ss->ssl3.hs.cacheSID) { |
9 + if (ss->ssl3.hs.cacheSID && ss->sec.isServer) { | 9 + if (ss->ssl3.hs.cacheSID && ss->sec.isServer) { |
10 PORT_Assert(ss->sec.ci.sid->cached == never_cached); | 10 PORT_Assert(ss->sec.ci.sid->cached == never_cached); |
11 (*ss->sec.cache)(ss->sec.ci.sid); | 11 (*ss->sec.cache)(ss->sec.ci.sid); |
12 ss->ssl3.hs.cacheSID = PR_FALSE; | 12 ss->ssl3.hs.cacheSID = PR_FALSE; |
13 diff -pu a/nss/lib/ssl/ssl.h b/nss/lib/ssl/ssl.h | 13 diff -pu a/nss/lib/ssl/ssl.h b/nss/lib/ssl/ssl.h |
14 --- a/nss/lib/ssl/ssl.h»2014-01-03 19:45:10.857611184 -0800 | 14 --- a/nss/lib/ssl/ssl.h»2014-01-17 19:00:52.843413560 -0800 |
15 +++ b/nss/lib/ssl/ssl.h»2014-01-03 19:45:18.457735467 -0800 | 15 +++ b/nss/lib/ssl/ssl.h»2014-01-17 19:01:36.374129696 -0800 |
16 @@ -872,6 +872,18 @@ SSL_IMPORT int SSL_DataPending(PRFileDes | 16 @@ -892,6 +892,18 @@ SSL_IMPORT int SSL_DataPending(PRFileDes |
17 SSL_IMPORT SECStatus SSL_InvalidateSession(PRFileDesc *fd); | 17 SSL_IMPORT SECStatus SSL_InvalidateSession(PRFileDesc *fd); |
18 | 18 |
19 /* | 19 /* |
20 +** Cache the SSL session associated with fd, if it has not already been cached. | 20 +** Cache the SSL session associated with fd, if it has not already been cached. |
21 +*/ | 21 +*/ |
22 +SSL_IMPORT SECStatus SSL_CacheSession(PRFileDesc *fd); | 22 +SSL_IMPORT SECStatus SSL_CacheSession(PRFileDesc *fd); |
23 + | 23 + |
24 +/* | 24 +/* |
25 +** Cache the SSL session associated with fd, if it has not already been cached. | 25 +** Cache the SSL session associated with fd, if it has not already been cached. |
26 +** This function may only be called when processing within a callback assigned | 26 +** This function may only be called when processing within a callback assigned |
27 +** via SSL_HandshakeCallback | 27 +** via SSL_HandshakeCallback |
28 +*/ | 28 +*/ |
29 +SSL_IMPORT SECStatus SSL_CacheSessionUnlocked(PRFileDesc *fd); | 29 +SSL_IMPORT SECStatus SSL_CacheSessionUnlocked(PRFileDesc *fd); |
30 + | 30 + |
31 +/* | 31 +/* |
32 ** Return a SECItem containing the SSL session ID associated with the fd. | 32 ** Return a SECItem containing the SSL session ID associated with the fd. |
33 */ | 33 */ |
34 SSL_IMPORT SECItem *SSL_GetSessionID(PRFileDesc *fd); | 34 SSL_IMPORT SECItem *SSL_GetSessionID(PRFileDesc *fd); |
35 diff -pu a/nss/lib/ssl/sslsecur.c b/nss/lib/ssl/sslsecur.c | 35 diff -pu a/nss/lib/ssl/sslsecur.c b/nss/lib/ssl/sslsecur.c |
36 --- a/nss/lib/ssl/sslsecur.c» 2014-01-03 19:39:28.452012178 -0800 | 36 --- a/nss/lib/ssl/sslsecur.c» 2014-01-17 17:59:03.242109996 -0800 |
37 +++ b/nss/lib/ssl/sslsecur.c» 2014-01-03 19:45:18.467735631 -0800 | 37 +++ b/nss/lib/ssl/sslsecur.c» 2014-01-17 19:01:36.374129696 -0800 |
38 @@ -1469,6 +1469,49 @@ SSL_InvalidateSession(PRFileDesc *fd) | 38 @@ -1469,6 +1469,49 @@ SSL_InvalidateSession(PRFileDesc *fd) |
39 return rv; | 39 return rv; |
40 } | 40 } |
41 | 41 |
42 +static void | 42 +static void |
43 +ssl3_CacheSessionUnlocked(sslSocket *ss) | 43 +ssl3_CacheSessionUnlocked(sslSocket *ss) |
44 +{ | 44 +{ |
45 + PORT_Assert(!ss->sec.isServer); | 45 + PORT_Assert(!ss->sec.isServer); |
46 + | 46 + |
47 + if (ss->ssl3.hs.cacheSID) { | 47 + if (ss->ssl3.hs.cacheSID) { |
(...skipping 30 matching lines...) Expand all Loading... |
78 + if (ss) { | 78 + if (ss) { |
79 + ssl3_CacheSessionUnlocked(ss); | 79 + ssl3_CacheSessionUnlocked(ss); |
80 + rv = SECSuccess; | 80 + rv = SECSuccess; |
81 + } | 81 + } |
82 + return rv; | 82 + return rv; |
83 +} | 83 +} |
84 + | 84 + |
85 SECItem * | 85 SECItem * |
86 SSL_GetSessionID(PRFileDesc *fd) | 86 SSL_GetSessionID(PRFileDesc *fd) |
87 { | 87 { |
OLD | NEW |