Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1454)

Unified Diff: net/third_party/nss/patches/sessioncache.patch

Issue 1882433002: Removing NSS files and USE_OPENSSL flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/third_party/nss/patches/secretexporterlocks.patch ('k') | net/third_party/nss/patches/tlsunique.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/patches/sessioncache.patch
diff --git a/net/third_party/nss/patches/sessioncache.patch b/net/third_party/nss/patches/sessioncache.patch
deleted file mode 100644
index 6e100c6f9564926f44591a768cfa8d9d1438e058..0000000000000000000000000000000000000000
--- a/net/third_party/nss/patches/sessioncache.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h
-index 70665a1..de5078b 100644
---- a/lib/ssl/ssl.h
-+++ b/lib/ssl/ssl.h
-@@ -973,6 +973,18 @@ SSL_IMPORT int SSL_DataPending(PRFileDesc *fd);
- SSL_IMPORT SECStatus SSL_InvalidateSession(PRFileDesc *fd);
-
- /*
-+** Cache the SSL session associated with fd, if it has not already been cached.
-+*/
-+SSL_IMPORT SECStatus SSL_CacheSession(PRFileDesc *fd);
-+
-+/*
-+** Cache the SSL session associated with fd, if it has not already been cached.
-+** This function may only be called when processing within a callback assigned
-+** via SSL_HandshakeCallback
-+*/
-+SSL_IMPORT SECStatus SSL_CacheSessionUnlocked(PRFileDesc *fd);
-+
-+/*
- ** Return a SECItem containing the SSL session ID associated with the fd.
- */
- SSL_IMPORT SECItem *SSL_GetSessionID(PRFileDesc *fd);
-diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c
-index b100b9b..7649abe 100644
---- a/lib/ssl/ssl3con.c
-+++ b/lib/ssl/ssl3con.c
-@@ -12397,7 +12397,7 @@ ssl3_FinishHandshake(sslSocket *ss)
- ss->ssl3.hs.receivedNewSessionTicket = PR_FALSE;
- }
-
-- if (ss->ssl3.hs.cacheSID) {
-+ if (ss->ssl3.hs.cacheSID && ss->sec.isServer) {
- PORT_Assert(ss->sec.ci.sid->cached == never_cached);
- (*ss->sec.cache)(ss->sec.ci.sid);
- ss->ssl3.hs.cacheSID = PR_FALSE;
-diff --git a/lib/ssl/sslsecur.c b/lib/ssl/sslsecur.c
-index 7ff0a2c..129f1f3 100644
---- a/lib/ssl/sslsecur.c
-+++ b/lib/ssl/sslsecur.c
-@@ -1486,6 +1486,49 @@ SSL_InvalidateSession(PRFileDesc *fd)
- return rv;
- }
-
-+static void
-+ssl3_CacheSessionUnlocked(sslSocket *ss)
-+{
-+ PORT_Assert(!ss->sec.isServer);
-+
-+ if (ss->ssl3.hs.cacheSID) {
-+ ss->sec.cache(ss->sec.ci.sid);
-+ ss->ssl3.hs.cacheSID = PR_FALSE;
-+ }
-+}
-+
-+SECStatus
-+SSL_CacheSession(PRFileDesc *fd)
-+{
-+ sslSocket *ss = ssl_FindSocket(fd);
-+ SECStatus rv = SECFailure;
-+
-+ if (ss) {
-+ ssl_Get1stHandshakeLock(ss);
-+ ssl_GetSSL3HandshakeLock(ss);
-+
-+ ssl3_CacheSessionUnlocked(ss);
-+ rv = SECSuccess;
-+
-+ ssl_ReleaseSSL3HandshakeLock(ss);
-+ ssl_Release1stHandshakeLock(ss);
-+ }
-+ return rv;
-+}
-+
-+SECStatus
-+SSL_CacheSessionUnlocked(PRFileDesc *fd)
-+{
-+ sslSocket *ss = ssl_FindSocket(fd);
-+ SECStatus rv = SECFailure;
-+
-+ if (ss) {
-+ ssl3_CacheSessionUnlocked(ss);
-+ rv = SECSuccess;
-+ }
-+ return rv;
-+}
-+
- SECItem *
- SSL_GetSessionID(PRFileDesc *fd)
- {
« no previous file with comments | « net/third_party/nss/patches/secretexporterlocks.patch ('k') | net/third_party/nss/patches/tlsunique.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698