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

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

Issue 8417032: net: add missing return value in SSL_SetNextProtoCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « net/third_party/nss/patches/nextproto.patch ('k') | net/third_party/nss/ssl/sslsock.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * SSL3 Protocol 2 * SSL3 Protocol
3 * 3 *
4 * ***** BEGIN LICENSE BLOCK ***** 4 * ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * 6 *
7 * The contents of this file are subject to the Mozilla Public License Version 7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with 8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at 9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/ 10 * http://www.mozilla.org/MPL/
(...skipping 5881 matching lines...) Expand 10 before | Expand all | Expand 10 after
5892 rv = ssl3_SendCertificateVerify(ss); 5892 rv = ssl3_SendCertificateVerify(ss);
5893 if (rv != SECSuccess) { 5893 if (rv != SECSuccess) {
5894 goto loser; /* err is set. */ 5894 goto loser; /* err is set. */
5895 } 5895 }
5896 } 5896 }
5897 rv = ssl3_SendChangeCipherSpecs(ss); 5897 rv = ssl3_SendChangeCipherSpecs(ss);
5898 if (rv != SECSuccess) { 5898 if (rv != SECSuccess) {
5899 goto loser; /* err code was set. */ 5899 goto loser; /* err code was set. */
5900 } 5900 }
5901 5901
5902 rv = ssl3_SendNextProto(ss); 5902 if (!ss->firstHsDone) {
wtc 2011/10/28 18:22:05 We should add a comment to explain this, because t
agl 2011/10/28 19:15:18 Done.
5903 if (rv != SECSuccess) { 5903 » rv = ssl3_SendNextProto(ss);
5904 » goto loser;» /* err code was set. */ 5904 » if (rv != SECSuccess) {
5905 » goto loser;»/* err code was set. */
5906 » }
5905 } 5907 }
5906 5908
5907 rv = ssl3_SendFinished(ss, 0); 5909 rv = ssl3_SendFinished(ss, 0);
5908 if (rv != SECSuccess) { 5910 if (rv != SECSuccess) {
5909 goto loser; /* err code was set. */ 5911 goto loser; /* err code was set. */
5910 } 5912 }
5911 5913
5912 ssl_ReleaseXmitBufLock(ss); /*******************************/ 5914 ssl_ReleaseXmitBufLock(ss); /*******************************/
5913 5915
5914 if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn)) 5916 if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn))
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after
8829 /* If this thread is in SSL_SecureSend (trying to write some data) 8831 /* If this thread is in SSL_SecureSend (trying to write some data)
8830 ** or if it is going to step up, 8832 ** or if it is going to step up,
8831 ** then set the ssl_SEND_FLAG_FORCE_INTO_BUFFER flag, so that the 8833 ** then set the ssl_SEND_FLAG_FORCE_INTO_BUFFER flag, so that the
8832 ** last two handshake messages (change cipher spec and finished) 8834 ** last two handshake messages (change cipher spec and finished)
8833 ** will be sent in the same send/write call as the application data. 8835 ** will be sent in the same send/write call as the application data.
8834 */ 8836 */
8835 if (doStepUp || ss->writerThread == PR_GetCurrentThread()) { 8837 if (doStepUp || ss->writerThread == PR_GetCurrentThread()) {
8836 flags = ssl_SEND_FLAG_FORCE_INTO_BUFFER; 8838 flags = ssl_SEND_FLAG_FORCE_INTO_BUFFER;
8837 } 8839 }
8838 8840
8839 » if (!isServer) { 8841 » if (!isServer && !ss->firstHsDone) {
8840 rv = ssl3_SendNextProto(ss); 8842 rv = ssl3_SendNextProto(ss);
8841 if (rv != SECSuccess) { 8843 if (rv != SECSuccess) {
8842 goto xmit_loser; /* err code was set. */ 8844 goto xmit_loser; /* err code was set. */
8843 } 8845 }
8844 } 8846 }
wtc 2011/10/28 18:22:05 It seems that this whole thing can be removed. I
agl 2011/10/28 19:15:18 Right, we explicitly say that NPN isn't part of th
8845 8847
8846 rv = ssl3_SendFinished(ss, flags); 8848 rv = ssl3_SendFinished(ss, flags);
8847 if (rv != SECSuccess) { 8849 if (rv != SECSuccess) {
8848 goto xmit_loser; /* err is set. */ 8850 goto xmit_loser; /* err is set. */
8849 } 8851 }
8850 } 8852 }
8851 8853
8852 /* Optimization: don't cache this connection if we're going to step up. */ 8854 /* Optimization: don't cache this connection if we're going to step up. */
8853 if (doStepUp) { 8855 if (doStepUp) {
8854 ssl_FreeSID(sid); 8856 ssl_FreeSID(sid);
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
9993 9995
9994 ss->ssl3.initialized = PR_FALSE; 9996 ss->ssl3.initialized = PR_FALSE;
9995 9997
9996 if (ss->ssl3.nextProto.data) { 9998 if (ss->ssl3.nextProto.data) {
9997 PORT_Free(ss->ssl3.nextProto.data); 9999 PORT_Free(ss->ssl3.nextProto.data);
9998 ss->ssl3.nextProto.data = NULL; 10000 ss->ssl3.nextProto.data = NULL;
9999 } 10001 }
10000 } 10002 }
10001 10003
10002 /* End of ssl3con.c */ 10004 /* End of ssl3con.c */
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/nextproto.patch ('k') | net/third_party/nss/ssl/sslsock.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698