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

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

Issue 9558017: Update net/third_party/nss to NSS 3.13.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Upload before checkin Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 From eb24998651cb972c60453b5d5fb1e13dfd8107ce Mon Sep 17 00:00:00 2001
2 From: Adam Langley <agl@chromium.org>
3 Date: Mon, 3 Oct 2011 12:26:44 -0400
4 Subject: [PATCH] handshakeshortwrite.patch
5
6 ---
7 mozilla/security/nss/lib/ssl/sslsecur.c | 13 ++++++++++++-
8 1 files changed, 12 insertions(+), 1 deletions(-)
9
10 diff --git a/mozilla/security/nss/lib/ssl/sslsecur.c b/mozilla/security/nss/lib/ ssl/sslsecur.c
11 index 816b8f6..dc374e0 100644
12 --- a/mozilla/security/nss/lib/ssl/sslsecur.c
13 +++ b/mozilla/security/nss/lib/ssl/sslsecur.c
14 @@ -388,6 +388,18 @@ SSL_ForceHandshake(PRFileDesc *fd)
15 if (!ss->opt.useSecurity)
16 return SECSuccess;
17
18 + if (!ssl_SocketIsBlocking(ss)) {
19 + ssl_GetXmitBufLock(ss);
20 + if (ss->pendingBuf.len != 0) {
21 + int sent = ssl_SendSavedWriteData(ss);
22 + if ((sent < 0) && (PORT_GetError() != PR_WOULD_BLOCK_ERROR)) {
23 + ssl_ReleaseXmitBufLock(ss);
24 + return SECFailure;
25 + }
26 + }
27 + ssl_ReleaseXmitBufLock(ss);
28 + }
29 +
30 ssl_Get1stHandshakeLock(ss);
31
32 if (ss->version >= SSL_LIBRARY_VERSION_3_0) {
33 @@ -1128,7 +1140,6 @@ ssl_SecureRecv(sslSocket *ss, unsigned char *buf, int len, int flags)
34 ssl_ReleaseXmitBufLock(ss);
35 return SECFailure;
36 }
37 - /* XXX short write? */
38 }
39 ssl_ReleaseXmitBufLock(ss);
40 }
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/getrequestedclientcerttypes.patch ('k') | net/third_party/nss/patches/nextproto.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698