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

Side by Side Diff: net/third_party/nss/ssl/ssl3con.c

Issue 1134493002: Fix NSS locking bug when sending no_renegotiate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « net/third_party/nss/patches/norenegotiatelock.patch ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* 2 /*
3 * SSL3 Protocol 3 * SSL3 Protocol
4 * 4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public 5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 8
9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */ 9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */
10 10
(...skipping 5514 matching lines...) Expand 10 before | Expand all | Expand 10 after
5525 PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); 5525 PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) );
5526 5526
5527 if (ss->ssl3.hs.ws == wait_server_hello) 5527 if (ss->ssl3.hs.ws == wait_server_hello)
5528 return SECSuccess; 5528 return SECSuccess;
5529 if (ss->ssl3.hs.ws != idle_handshake || ss->sec.isServer) { 5529 if (ss->ssl3.hs.ws != idle_handshake || ss->sec.isServer) {
5530 (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message); 5530 (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
5531 PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HELLO_REQUEST); 5531 PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HELLO_REQUEST);
5532 return SECFailure; 5532 return SECFailure;
5533 } 5533 }
5534 if (ss->opt.enableRenegotiation == SSL_RENEGOTIATE_NEVER) { 5534 if (ss->opt.enableRenegotiation == SSL_RENEGOTIATE_NEVER) {
5535 » ssl_GetXmitBufLock(ss); 5535 » (void)SSL3_SendAlert(ss, alert_warning, no_renegotiation);
5536 » rv = SSL3_SendAlert(ss, alert_warning, no_renegotiation);
5537 » ssl_ReleaseXmitBufLock(ss);
5538 PORT_SetError(SSL_ERROR_RENEGOTIATION_NOT_ALLOWED); 5536 PORT_SetError(SSL_ERROR_RENEGOTIATION_NOT_ALLOWED);
5539 return SECFailure; 5537 return SECFailure;
5540 } 5538 }
5541 5539
5542 if (sid) { 5540 if (sid) {
5543 if (ss->sec.uncache) 5541 if (ss->sec.uncache)
5544 ss->sec.uncache(sid); 5542 ss->sec.uncache(sid);
5545 ssl_FreeSID(sid); 5543 ssl_FreeSID(sid);
5546 ss->sec.ci.sid = NULL; 5544 ss->sec.ci.sid = NULL;
5547 } 5545 }
(...skipping 7342 matching lines...) Expand 10 before | Expand all | Expand 10 after
12890 PORT_Free(ss->ssl3.hs.recvdFragments.buf); 12888 PORT_Free(ss->ssl3.hs.recvdFragments.buf);
12891 } 12889 }
12892 } 12890 }
12893 12891
12894 ss->ssl3.initialized = PR_FALSE; 12892 ss->ssl3.initialized = PR_FALSE;
12895 12893
12896 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); 12894 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE);
12897 } 12895 }
12898 12896
12899 /* End of ssl3con.c */ 12897 /* End of ssl3con.c */
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/norenegotiatelock.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698