| OLD | NEW |
| 1 diff --git a/net/third_party/nss/ssl/exports_win.def b/net/third_party/nss/ssl/e
xports_win.def | 1 diff -pu a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c |
| 2 index e0624f1..a1045bb 100644 | 2 --- a/nss/lib/ssl/ssl3con.c» 2014-01-03 19:45:10.857611184 -0800 |
| 3 --- a/net/third_party/nss/ssl/exports_win.def | 3 +++ b/nss/lib/ssl/ssl3con.c» 2014-01-03 19:45:18.457735467 -0800 |
| 4 +++ b/net/third_party/nss/ssl/exports_win.def | 4 @@ -11318,7 +11318,7 @@ ssl3_FinishHandshake(sslSocket * ss) |
| 5 @@ -62,3 +62,5 @@ SSL_RestartHandshakeAfterChannelIDReq | 5 ss->ssl3.hs.receivedNewSessionTicket = PR_FALSE; |
| 6 SSL_GetChannelBinding | 6 } |
| 7 SSL_PeerSignedCertTimestamps | 7 |
| 8 SSL_CipherOrderSet | 8 - if (ss->ssl3.hs.cacheSID) { |
| 9 +SSL_CacheSession | 9 + if (ss->ssl3.hs.cacheSID && ss->sec.isServer) { |
| 10 +SSL_CacheSessionUnlocked | 10 » PORT_Assert(ss->sec.ci.sid->cached == never_cached); |
| 11 diff --git a/net/third_party/nss/ssl/ssl.h b/net/third_party/nss/ssl/ssl.h | 11 » (*ss->sec.cache)(ss->sec.ci.sid); |
| 12 index bef33fc..6f7c988 100644 | 12 » ss->ssl3.hs.cacheSID = PR_FALSE; |
| 13 --- a/net/third_party/nss/ssl/ssl.h | 13 diff -pu a/nss/lib/ssl/ssl.h b/nss/lib/ssl/ssl.h |
| 14 +++ b/net/third_party/nss/ssl/ssl.h | 14 --- a/nss/lib/ssl/ssl.h»2014-01-03 19:45:10.857611184 -0800 |
| 15 @@ -872,6 +872,18 @@ SSL_IMPORT int SSL_DataPending(PRFileDesc *fd); | 15 +++ b/nss/lib/ssl/ssl.h»2014-01-03 19:45:18.457735467 -0800 |
| 16 @@ -872,6 +872,18 @@ SSL_IMPORT int SSL_DataPending(PRFileDes |
| 16 SSL_IMPORT SECStatus SSL_InvalidateSession(PRFileDesc *fd); | 17 SSL_IMPORT SECStatus SSL_InvalidateSession(PRFileDesc *fd); |
| 17 | 18 |
| 18 /* | 19 /* |
| 19 +** 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. |
| 20 +*/ | 21 +*/ |
| 21 +SSL_IMPORT SECStatus SSL_CacheSession(PRFileDesc *fd); | 22 +SSL_IMPORT SECStatus SSL_CacheSession(PRFileDesc *fd); |
| 22 + | 23 + |
| 23 +/* | 24 +/* |
| 24 +** 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. |
| 25 +** 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 |
| 26 +** via SSL_HandshakeCallback | 27 +** via SSL_HandshakeCallback |
| 27 +*/ | 28 +*/ |
| 28 +SSL_IMPORT SECStatus SSL_CacheSessionUnlocked(PRFileDesc *fd); | 29 +SSL_IMPORT SECStatus SSL_CacheSessionUnlocked(PRFileDesc *fd); |
| 29 + | 30 + |
| 30 +/* | 31 +/* |
| 31 ** 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. |
| 32 */ | 33 */ |
| 33 SSL_IMPORT SECItem *SSL_GetSessionID(PRFileDesc *fd); | 34 SSL_IMPORT SECItem *SSL_GetSessionID(PRFileDesc *fd); |
| 34 diff --git a/net/third_party/nss/ssl/ssl3con.c b/net/third_party/nss/ssl/ssl3con
.c | 35 diff -pu a/nss/lib/ssl/sslsecur.c b/nss/lib/ssl/sslsecur.c |
| 35 index 307a0fe..e2be5e6 100644 | 36 --- a/nss/lib/ssl/sslsecur.c» 2014-01-03 19:39:28.452012178 -0800 |
| 36 --- a/net/third_party/nss/ssl/ssl3con.c | 37 +++ b/nss/lib/ssl/sslsecur.c» 2014-01-03 19:45:18.467735631 -0800 |
| 37 +++ b/net/third_party/nss/ssl/ssl3con.c | 38 @@ -1469,6 +1469,49 @@ SSL_InvalidateSession(PRFileDesc *fd) |
| 38 @@ -11240,7 +11240,7 @@ ssl3_FinishHandshake(sslSocket * ss) | |
| 39 /* The first handshake is now completed. */ | |
| 40 ss->handshake = NULL; | |
| 41 | |
| 42 - if (ss->ssl3.hs.cacheSID) { | |
| 43 + if (ss->ssl3.hs.cacheSID && ss->sec.isServer) { | |
| 44 » (*ss->sec.cache)(ss->sec.ci.sid); | |
| 45 » ss->ssl3.hs.cacheSID = PR_FALSE; | |
| 46 } | |
| 47 diff --git a/net/third_party/nss/ssl/sslsecur.c b/net/third_party/nss/ssl/sslsec
ur.c | |
| 48 index 31c343f..99538e5 100644 | |
| 49 --- a/net/third_party/nss/ssl/sslsecur.c | |
| 50 +++ b/net/third_party/nss/ssl/sslsecur.c | |
| 51 @@ -1474,6 +1474,49 @@ SSL_InvalidateSession(PRFileDesc *fd) | |
| 52 return rv; | 39 return rv; |
| 53 } | 40 } |
| 54 | 41 |
| 55 +static void | 42 +static void |
| 56 +ssl3_CacheSessionUnlocked(sslSocket *ss) | 43 +ssl3_CacheSessionUnlocked(sslSocket *ss) |
| 57 +{ | 44 +{ |
| 58 + PORT_Assert(!ss->sec.isServer); | 45 + PORT_Assert(!ss->sec.isServer); |
| 59 + | 46 + |
| 60 + if (ss->ssl3.hs.cacheSID) { | 47 + if (ss->ssl3.hs.cacheSID) { |
| 61 + ss->sec.cache(ss->sec.ci.sid); | 48 + ss->sec.cache(ss->sec.ci.sid); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 91 + if (ss) { | 78 + if (ss) { |
| 92 + ssl3_CacheSessionUnlocked(ss); | 79 + ssl3_CacheSessionUnlocked(ss); |
| 93 + rv = SECSuccess; | 80 + rv = SECSuccess; |
| 94 + } | 81 + } |
| 95 + return rv; | 82 + return rv; |
| 96 +} | 83 +} |
| 97 + | 84 + |
| 98 SECItem * | 85 SECItem * |
| 99 SSL_GetSessionID(PRFileDesc *fd) | 86 SSL_GetSessionID(PRFileDesc *fd) |
| 100 { | 87 { |
| OLD | NEW |