summaryrefslogtreecommitdiffstats
path: root/net/third_party/nss/patches/didhandshakeresume.patch
blob: ed74c799d8a8ce40ed074a90d65ee2a8fbd361ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff -up a/src/net/third_party/nss/ssl/ssl.h b/src/net/third_party/nss/ssl/ssl.h
--- a/src/net/third_party/nss/ssl/ssl.h	2012-02-28 20:34:50.114663722 -0800
+++ b/src/net/third_party/nss/ssl/ssl.h	2012-02-29 14:37:56.872332622 -0800
@@ -818,6 +818,9 @@ SSL_IMPORT SECStatus SSL_HandshakeNegoti
                                                       SSLExtensionType extId,
                                                       PRBool *yes);
 
+SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd,
+                                                 PRBool *last_handshake_resumed);
+
 /*
  * Return a boolean that indicates whether the underlying library
  * will perform as the caller expects.
diff -up a/src/net/third_party/nss/ssl/sslsock.c b/src/net/third_party/nss/ssl/sslsock.c
--- a/src/net/third_party/nss/ssl/sslsock.c	2012-02-28 20:34:50.124663860 -0800
+++ b/src/net/third_party/nss/ssl/sslsock.c	2012-02-29 14:39:13.203415737 -0800
@@ -1590,6 +1590,20 @@ SSL_GetStapledOCSPResponse(PRFileDesc *f
     return SECSuccess;
 }
 
+SECStatus
+SSL_HandshakeResumedSession(PRFileDesc *fd, PRBool *handshake_resumed) {
+    sslSocket *ss = ssl_FindSocket(fd);
+
+    if (!ss) {
+	SSL_DBG(("%d: SSL[%d]: bad socket in SSL_HandshakeResumedSession",
+		 SSL_GETPID(), fd));
+	return SECFailure;
+    }
+
+    *handshake_resumed = ss->ssl3.hs.isResuming;
+    return SECSuccess;
+}
+
 /************************************************************************/
 /* The following functions are the TOP LEVEL SSL functions.
 ** They all get called through the NSPRIOMethods table below.