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

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

Issue 99253006: Fill the TLS padding extension with zero bytes instead of spaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « net/third_party/nss/patches/paddingextension.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 /* 1 /*
2 * SSL3 Protocol 2 * SSL3 Protocol
3 * 3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public 4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 7
8 /* TLS extension code moved here from ssl3ecc.c */ 8 /* TLS extension code moved here from ssl3ecc.c */
9 9
10 #include "nssrenam.h" 10 #include "nssrenam.h"
(...skipping 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 extensionLen > maxBytes || 2360 extensionLen > maxBytes ||
2361 paddingLen > sizeof(padding)) { 2361 paddingLen > sizeof(padding)) {
2362 PORT_Assert(0); 2362 PORT_Assert(0);
2363 return -1; 2363 return -1;
2364 } 2364 }
2365 2365
2366 if (SECSuccess != ssl3_AppendHandshakeNumber(ss, ssl_padding_xtn, 2)) 2366 if (SECSuccess != ssl3_AppendHandshakeNumber(ss, ssl_padding_xtn, 2))
2367 return -1; 2367 return -1;
2368 if (SECSuccess != ssl3_AppendHandshakeNumber(ss, paddingLen, 2)) 2368 if (SECSuccess != ssl3_AppendHandshakeNumber(ss, paddingLen, 2))
2369 return -1; 2369 return -1;
2370 memset(padding, ' ', paddingLen); 2370 memset(padding, 0, paddingLen);
2371 if (SECSuccess != ssl3_AppendHandshake(ss, padding, paddingLen)) 2371 if (SECSuccess != ssl3_AppendHandshake(ss, padding, paddingLen))
2372 return -1; 2372 return -1;
2373 2373
2374 return extensionLen; 2374 return extensionLen;
2375 } 2375 }
2376 2376
2377 /* ssl3_ClientSendSignedCertTimestampXtn sends the signed_certificate_timestamp 2377 /* ssl3_ClientSendSignedCertTimestampXtn sends the signed_certificate_timestamp
2378 * extension for TLS ClientHellos. */ 2378 * extension for TLS ClientHellos. */
2379 static PRInt32 2379 static PRInt32
2380 ssl3_ClientSendSignedCertTimestampXtn(sslSocket *ss, PRBool append, 2380 ssl3_ClientSendSignedCertTimestampXtn(sslSocket *ss, PRBool append,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 2428
2429 if (!data->len) { 2429 if (!data->len) {
2430 /* Empty extension data: RFC 6962 mandates non-empty contents. */ 2430 /* Empty extension data: RFC 6962 mandates non-empty contents. */
2431 return SECFailure; 2431 return SECFailure;
2432 } 2432 }
2433 *scts = *data; 2433 *scts = *data;
2434 /* Keep track of negotiated extensions. */ 2434 /* Keep track of negotiated extensions. */
2435 ss->xtnData.negotiated[ss->xtnData.numNegotiated++] = ex_type; 2435 ss->xtnData.negotiated[ss->xtnData.numNegotiated++] = ex_type;
2436 return SECSuccess; 2436 return SECSuccess;
2437 } 2437 }
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/paddingextension.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698