summaryrefslogtreecommitdiffstats
path: root/net/third_party/nss/patches/didhandshakeresume.patch
blob: 8c2a5a585fefc2336543e331a887fa24ad47b3b6 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
commit c1b34e0cdaed8eef92aa268a442965eb60828c7b
Author: Adam Langley <agl@chromium.org>
Date:   Tue Jun 21 11:41:12 2011 -0400

    didhandshakeresume.patch

diff --git a/mozilla/security/nss/lib/ssl/ssl.def b/mozilla/security/nss/lib/ssl/ssl.def
index 35cc1e3..7ef15db 100644
--- a/mozilla/security/nss/lib/ssl/ssl.def
+++ b/mozilla/security/nss/lib/ssl/ssl.def
@@ -156,6 +156,7 @@ SSL_SNISocketConfigHook;
 ;+    global:
 SSL_GetNextProto;
 SSL_GetStapledOCSPResponse;
+SSL_HandshakeResumedSession;
 SSL_PeerCertificateChain;
 SSL_SetNextProtoNego;
 ;+    local:
diff --git a/mozilla/security/nss/lib/ssl/ssl.h b/mozilla/security/nss/lib/ssl/ssl.h
index e7d6c54..5682d0a 100644
--- a/mozilla/security/nss/lib/ssl/ssl.h
+++ b/mozilla/security/nss/lib/ssl/ssl.h
@@ -730,6 +730,10 @@ SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket,
                                                       SSLExtensionType extId,
                                                       PRBool *yes);
 
+SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd,
+                                                 PRBool *last_handshake_resumed);
+
+
 SEC_END_PROTOS
 
 #endif /* __ssl_h_ */
diff --git a/mozilla/security/nss/lib/ssl/sslsock.c b/mozilla/security/nss/lib/ssl/sslsock.c
index f00f8f4..340d17c 100644
--- a/mozilla/security/nss/lib/ssl/sslsock.c
+++ b/mozilla/security/nss/lib/ssl/sslsock.c
@@ -1517,6 +1517,20 @@ SSL_GetStapledOCSPResponse(PRFileDesc *fd, unsigned char *out_data,
     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.