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

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

Issue 8156001: net: rework the NPN patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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
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 8539 matching lines...) Expand 10 before | Expand all | Expand 10 after
8550 8550
8551 /* called from ssl3_HandleServerHelloDone 8551 /* called from ssl3_HandleServerHelloDone
8552 */ 8552 */
8553 static SECStatus 8553 static SECStatus
8554 ssl3_SendNextProto(sslSocket *ss) 8554 ssl3_SendNextProto(sslSocket *ss)
8555 { 8555 {
8556 SECStatus rv; 8556 SECStatus rv;
8557 int padding_len; 8557 int padding_len;
8558 static const unsigned char padding[32] = {0}; 8558 static const unsigned char padding[32] = {0};
8559 8559
8560 if (ss->ssl3.nextProtoState == SSL_NEXT_PROTO_NO_SUPPORT) 8560 if (ss->ssl3.nextProto.len == 0)
8561 return SECSuccess; 8561 return SECSuccess;
8562 8562
8563 PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss)); 8563 PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
8564 PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); 8564 PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
8565 8565
8566 padding_len = 32 - ((ss->ssl3.nextProto.len + 2) % 32); 8566 padding_len = 32 - ((ss->ssl3.nextProto.len + 2) % 32);
8567 8567
8568 rv = ssl3_AppendHandshakeHeader(ss, next_proto, ss->ssl3.nextProto.len + 8568 rv = ssl3_AppendHandshakeHeader(ss, next_proto, ss->ssl3.nextProto.len +
8569 2 + padding_len); 8569 2 + padding_len);
8570 if (rv != SECSuccess) { 8570 if (rv != SECSuccess) {
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
9993 9993
9994 ss->ssl3.initialized = PR_FALSE; 9994 ss->ssl3.initialized = PR_FALSE;
9995 9995
9996 if (ss->ssl3.nextProto.data) { 9996 if (ss->ssl3.nextProto.data) {
9997 PORT_Free(ss->ssl3.nextProto.data); 9997 PORT_Free(ss->ssl3.nextProto.data);
9998 ss->ssl3.nextProto.data = NULL; 9998 ss->ssl3.nextProto.data = NULL;
9999 } 9999 }
10000 } 10000 }
10001 10001
10002 /* End of ssl3con.c */ 10002 /* End of ssl3con.c */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698