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

Side by Side Diff: net/third_party/nss/patches/nssrwlock.patch

Issue 1511123006: Uprev NSS (in libssl) to NSS 3.21 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated deps Created 5 years 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 unified diff | Download patch
OLDNEW
1 diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c 1 diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c
2 index 0ac85da..f5afab7 100644 2 index afab931..e5e620f 100644
3 --- a/ssl/ssl3con.c 3 --- a/lib/ssl/ssl3con.c
4 +++ b/ssl/ssl3con.c 4 +++ b/lib/ssl/ssl3con.c
5 @@ -5261,7 +5261,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 5 @@ -5436,7 +5436,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
6 * the lock across the calls to ssl3_CallHelloExtensionSenders. 6 * the lock across the calls to ssl3_CallHelloExtensionSenders.
7 */ 7 */
8 if (sid->u.ssl3.lock) { 8 if (sid->u.ssl3.lock) {
9 - PR_RWLock_Rlock(sid->u.ssl3.lock); 9 - PR_RWLock_Rlock(sid->u.ssl3.lock);
10 + NSSRWLock_LockRead(sid->u.ssl3.lock); 10 + NSSRWLock_LockRead(sid->u.ssl3.lock);
11 } 11 }
12 12
13 if (isTLS || (ss->firstHsDone && ss->peerRequestedProtection)) { 13 if (isTLS || (ss->firstHsDone && ss->peerRequestedProtection)) {
14 @@ -5270,7 +5270,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 14 @@ -5445,7 +5445,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
15 15
16 extLen = ssl3_CallHelloExtensionSenders(ss, PR_FALSE, maxBytes, NULL); 16 extLen = ssl3_CallHelloExtensionSenders(ss, PR_FALSE, maxBytes, NULL);
17 if (extLen < 0) { 17 if (extLen < 0) {
18 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 18 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
19 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 19 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
20 return SECFailure; 20 return SECFailure;
21 } 21 }
22 total_exten_len += extLen; 22 total_exten_len += extLen;
23 @@ -5297,7 +5297,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 23 @@ -5472,7 +5472,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
24 /* how many suites are permitted by policy and user preference? */ 24 /* how many suites are permitted by policy and user preference? */
25 num_suites = count_cipher_suites(ss, ss->ssl3.policy, PR_TRUE); 25 num_suites = count_cipher_suites(ss, ss->ssl3.policy, PR_TRUE);
26 if (!num_suites) { 26 if (!num_suites) {
27 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 27 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
28 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 28 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
29 return SECFailure; /* count_cipher_suites has set error code. */ 29 return SECFailure; /* count_cipher_suites has set error code. */
30 } 30 }
31 31
32 @@ -5342,7 +5342,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 32 @@ -5517,7 +5517,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
33 33
34 rv = ssl3_AppendHandshakeHeader(ss, client_hello, length); 34 rv = ssl3_AppendHandshakeHeader(ss, client_hello, length);
35 if (rv != SECSuccess) { 35 if (rv != SECSuccess) {
36 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 36 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
37 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 37 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
38 return rv; /* err set by ssl3_AppendHandshake* */ 38 return rv; /* err set by ssl3_AppendHandshake* */
39 } 39 }
40 40
41 @@ -5361,21 +5361,21 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 41 @@ -5536,21 +5536,21 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
42 rv = ssl3_AppendHandshakeNumber(ss, ss->clientHelloVersion, 2); 42 rv = ssl3_AppendHandshakeNumber(ss, ss->clientHelloVersion, 2);
43 } 43 }
44 if (rv != SECSuccess) { 44 if (rv != SECSuccess) {
45 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 45 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
46 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 46 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
47 return rv; /* err set by ssl3_AppendHandshake* */ 47 return rv; /* err set by ssl3_AppendHandshake* */
48 } 48 }
49 49
50 if (!resending) { /* Don't re-generate if we are in DTLS re-sending mode */ 50 if (!resending) { /* Don't re-generate if we are in DTLS re-sending mode */
51 rv = ssl3_GetNewRandom(&ss->ssl3.hs.client_random); 51 rv = ssl3_GetNewRandom(&ss->ssl3.hs.client_random);
52 if (rv != SECSuccess) { 52 if (rv != SECSuccess) {
53 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 53 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
54 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 54 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
55 return rv; /* err set by GetNewRandom. */ 55 return rv; /* err set by GetNewRandom. */
56 } 56 }
57 } 57 }
58 rv = ssl3_AppendHandshake(ss, &ss->ssl3.hs.client_random, 58 rv = ssl3_AppendHandshake(ss, &ss->ssl3.hs.client_random,
59 SSL3_RANDOM_LENGTH); 59 SSL3_RANDOM_LENGTH);
60 if (rv != SECSuccess) { 60 if (rv != SECSuccess) {
61 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 61 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
62 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 62 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
63 return rv; /* err set by ssl3_AppendHandshake* */ 63 return rv; /* err set by ssl3_AppendHandshake* */
64 } 64 }
65 65
66 @@ -5385,7 +5385,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 66 @@ -5560,7 +5560,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
67 else 67 else
68 rv = ssl3_AppendHandshakeNumber(ss, 0, 1); 68 rv = ssl3_AppendHandshakeNumber(ss, 0, 1);
69 if (rv != SECSuccess) { 69 if (rv != SECSuccess) {
70 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 70 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
71 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 71 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
72 return rv; /* err set by ssl3_AppendHandshake* */ 72 return rv; /* err set by ssl3_AppendHandshake* */
73 } 73 }
74 74
75 @@ -5393,14 +5393,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 75 @@ -5568,14 +5568,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
76 rv = ssl3_AppendHandshakeVariable( 76 rv = ssl3_AppendHandshakeVariable(
77 ss, ss->ssl3.hs.cookie, ss->ssl3.hs.cookieLen, 1); 77 ss, ss->ssl3.hs.cookie, ss->ssl3.hs.cookieLen, 1);
78 if (rv != SECSuccess) { 78 if (rv != SECSuccess) {
79 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 79 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
80 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 80 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
81 return rv; /* err set by ssl3_AppendHandshake* */ 81 return rv; /* err set by ssl3_AppendHandshake* */
82 } 82 }
83 } 83 }
84 84
85 rv = ssl3_AppendHandshakeNumber(ss, num_suites*sizeof(ssl3CipherSuite), 2); 85 rv = ssl3_AppendHandshakeNumber(ss, num_suites*sizeof(ssl3CipherSuite), 2);
86 if (rv != SECSuccess) { 86 if (rv != SECSuccess) {
87 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 87 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
88 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 88 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
89 return rv; /* err set by ssl3_AppendHandshake* */ 89 return rv; /* err set by ssl3_AppendHandshake* */
90 } 90 }
91 91
92 @@ -5409,7 +5409,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 92 @@ -5584,7 +5584,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
93 rv = ssl3_AppendHandshakeNumber(ss, TLS_EMPTY_RENEGOTIATION_INFO_SCSV, 93 rv = ssl3_AppendHandshakeNumber(ss, TLS_EMPTY_RENEGOTIATION_INFO_SCSV,
94 sizeof(ssl3CipherSuite)); 94 sizeof(ssl3CipherSuite));
95 if (rv != SECSuccess) { 95 if (rv != SECSuccess) {
96 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 96 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
97 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 97 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
98 return rv; /* err set by ssl3_AppendHandshake* */ 98 return rv; /* err set by ssl3_AppendHandshake* */
99 } 99 }
100 actual_count++; 100 actual_count++;
101 @@ -5418,7 +5418,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 101 @@ -5593,7 +5593,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
102 rv = ssl3_AppendHandshakeNumber(ss, TLS_FALLBACK_SCSV, 102 rv = ssl3_AppendHandshakeNumber(ss, TLS_FALLBACK_SCSV,
103 sizeof(ssl3CipherSuite)); 103 sizeof(ssl3CipherSuite));
104 if (rv != SECSuccess) { 104 if (rv != SECSuccess) {
105 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 105 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
106 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 106 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
107 return rv; /* err set by ssl3_AppendHandshake* */ 107 return rv; /* err set by ssl3_AppendHandshake* */
108 } 108 }
109 actual_count++; 109 actual_count++;
110 @@ -5428,7 +5428,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 110 @@ -5603,7 +5603,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
111 » if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange)) { 111 » if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange, ss)) {
112 actual_count++; 112 actual_count++;
113 if (actual_count > num_suites) { 113 if (actual_count > num_suites) {
114 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 114 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
115 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 115 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
116 /* set error card removal/insertion error */ 116 /* set error card removal/insertion error */
117 PORT_SetError(SSL_ERROR_TOKEN_INSERTION_REMOVAL); 117 PORT_SetError(SSL_ERROR_TOKEN_INSERTION_REMOVAL);
118 return SECFailure; 118 return SECFailure;
119 @@ -5436,7 +5436,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 119 @@ -5611,7 +5611,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
120 rv = ssl3_AppendHandshakeNumber(ss, suite->cipher_suite, 120 rv = ssl3_AppendHandshakeNumber(ss, suite->cipher_suite,
121 sizeof(ssl3CipherSuite)); 121 sizeof(ssl3CipherSuite));
122 if (rv != SECSuccess) { 122 if (rv != SECSuccess) {
123 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 123 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
124 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 124 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
125 return rv; /* err set by ssl3_AppendHandshake* */ 125 return rv; /* err set by ssl3_AppendHandshake* */
126 } 126 }
127 } 127 }
128 @@ -5447,14 +5447,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 128 @@ -5622,14 +5622,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
129 * the server.. */ 129 * the server.. */
130 if (actual_count != num_suites) { 130 if (actual_count != num_suites) {
131 /* Card removal/insertion error */ 131 /* Card removal/insertion error */
132 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 132 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
133 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 133 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
134 PORT_SetError(SSL_ERROR_TOKEN_INSERTION_REMOVAL); 134 PORT_SetError(SSL_ERROR_TOKEN_INSERTION_REMOVAL);
135 return SECFailure; 135 return SECFailure;
136 } 136 }
137 137
138 rv = ssl3_AppendHandshakeNumber(ss, numCompressionMethods, 1); 138 rv = ssl3_AppendHandshakeNumber(ss, numCompressionMethods, 1);
139 if (rv != SECSuccess) { 139 if (rv != SECSuccess) {
140 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 140 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
141 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 141 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
142 return rv; /* err set by ssl3_AppendHandshake* */ 142 return rv; /* err set by ssl3_AppendHandshake* */
143 } 143 }
144 for (i = 0; i < compressionMethodsCount; i++) { 144 for (i = 0; i < compressionMethodsCount; i++) {
145 @@ -5462,7 +5462,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 145 @@ -5637,7 +5637,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
146 continue; 146 continue;
147 rv = ssl3_AppendHandshakeNumber(ss, compressions[i], 1); 147 rv = ssl3_AppendHandshakeNumber(ss, compressions[i], 1);
148 if (rv != SECSuccess) { 148 if (rv != SECSuccess) {
149 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 149 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
150 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 150 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
151 return rv; /* err set by ssl3_AppendHandshake* */ 151 return rv; /* err set by ssl3_AppendHandshake* */
152 } 152 }
153 } 153 }
154 @@ -5473,20 +5473,20 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 154 @@ -5648,20 +5648,20 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
155 155
156 rv = ssl3_AppendHandshakeNumber(ss, maxBytes, 2); 156 rv = ssl3_AppendHandshakeNumber(ss, maxBytes, 2);
157 if (rv != SECSuccess) { 157 if (rv != SECSuccess) {
158 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 158 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
159 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 159 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
160 return rv; /* err set by AppendHandshake. */ 160 return rv; /* err set by AppendHandshake. */
161 } 161 }
162 162
163 extLen = ssl3_CallHelloExtensionSenders(ss, PR_TRUE, maxBytes, NULL); 163 extLen = ssl3_CallHelloExtensionSenders(ss, PR_TRUE, maxBytes, NULL);
164 if (extLen < 0) { 164 if (extLen < 0) {
165 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 165 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
166 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 166 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
167 return SECFailure; 167 return SECFailure;
168 } 168 }
169 maxBytes -= extLen; 169 maxBytes -= extLen;
170 170
171 extLen = ssl3_AppendPaddingExtension(ss, paddingExtensionLen, maxBytes); 171 extLen = ssl3_AppendPaddingExtension(ss, paddingExtensionLen, maxBytes);
172 if (extLen < 0) { 172 if (extLen < 0) {
173 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } 173 - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); }
174 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } 174 + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); }
175 return SECFailure; 175 return SECFailure;
176 } 176 }
177 maxBytes -= extLen; 177 maxBytes -= extLen;
178 @@ -5495,7 +5495,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) 178 @@ -5670,7 +5670,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending)
179 } 179 }
180 180
181 if (sid->u.ssl3.lock) { 181 if (sid->u.ssl3.lock) {
182 - PR_RWLock_Unlock(sid->u.ssl3.lock); 182 - PR_RWLock_Unlock(sid->u.ssl3.lock);
183 + NSSRWLock_UnlockRead(sid->u.ssl3.lock); 183 + NSSRWLock_UnlockRead(sid->u.ssl3.lock);
184 } 184 }
185 185
186 if (ss->xtnData.sentSessionTicketInClientHello) { 186 if (ss->xtnData.sentSessionTicketInClientHello) {
187 diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h 187 diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h
188 index d12228e..efcbf9f 100644 188 index 3403091..874e59c 100644
189 --- a/ssl/sslimpl.h 189 --- a/lib/ssl/sslimpl.h
190 +++ b/ssl/sslimpl.h 190 +++ b/lib/ssl/sslimpl.h
191 @@ -731,7 +731,7 @@ struct sslSessionIDStr { 191 @@ -742,7 +742,7 @@ struct sslSessionIDStr {
192 * cached. Before then, there is no need to lock anything because 192 * cached. Before then, there is no need to lock anything because
193 * the sid isn't being shared by anything. 193 * the sid isn't being shared by anything.
194 */ 194 */
195 - PRRWLock *lock; 195 - PRRWLock *lock;
196 + NSSRWLock *lock; 196 + NSSRWLock *lock;
197 197
198 /* The lock must be held while reading or writing these members 198 /* The lock must be held while reading or writing these members
199 * because they change while the sid is cached. 199 * because they change while the sid is cached.
200 diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c 200 diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c
201 index cefdda6..28ad364 100644 201 index cefdda6..28ad364 100644
202 --- a/ssl/sslnonce.c 202 --- a/lib/ssl/sslnonce.c
203 +++ b/ssl/sslnonce.c 203 +++ b/lib/ssl/sslnonce.c
204 @@ -136,7 +136,7 @@ ssl_DestroySID(sslSessionID *sid) 204 @@ -136,7 +136,7 @@ ssl_DestroySID(sslSessionID *sid)
205 } 205 }
206 206
207 if (sid->u.ssl3.lock) { 207 if (sid->u.ssl3.lock) {
208 - PR_DestroyRWLock(sid->u.ssl3.lock); 208 - PR_DestroyRWLock(sid->u.ssl3.lock);
209 + NSSRWLock_Destroy(sid->u.ssl3.lock); 209 + NSSRWLock_Destroy(sid->u.ssl3.lock);
210 } 210 }
211 } 211 }
212 212
213 @@ -308,7 +308,7 @@ CacheSID(sslSessionID *sid) 213 @@ -308,7 +308,7 @@ CacheSID(sslSessionID *sid)
(...skipping 15 matching lines...) Expand all
229 SECITEM_FreeItem(&sid->u.ssl3.locked.sessionTicket.ticket, 229 SECITEM_FreeItem(&sid->u.ssl3.locked.sessionTicket.ticket,
230 PR_FALSE); 230 PR_FALSE);
231 @@ -465,6 +465,6 @@ ssl3_SetSIDSessionTicket(sslSessionID *sid, 231 @@ -465,6 +465,6 @@ ssl3_SetSIDSessionTicket(sslSessionID *sid,
232 newSessionTicket->ticket.len = 0; 232 newSessionTicket->ticket.len = 0;
233 233
234 if (sid->u.ssl3.lock) { 234 if (sid->u.ssl3.lock) {
235 - PR_RWLock_Unlock(sid->u.ssl3.lock); 235 - PR_RWLock_Unlock(sid->u.ssl3.lock);
236 + NSSRWLock_UnlockWrite(sid->u.ssl3.lock); 236 + NSSRWLock_UnlockWrite(sid->u.ssl3.lock);
237 } 237 }
238 } 238 }
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/norenegotiatelock.patch ('k') | net/third_party/nss/patches/removebuildmetadata.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698