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

Unified Diff: net/third_party/nss/ssl/ssl3con.c

Issue 8393035: Revert 97269 - Send only one byte of data in the first CBC encrypted (Closed) Base URL: svn://svn.chromium.org/chrome/branches/874_102/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/third_party/nss/patches/cbcrandomiv.patch ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/ssl/ssl3con.c
===================================================================
--- net/third_party/nss/ssl/ssl3con.c (revision 107268)
+++ net/third_party/nss/ssl/ssl3con.c (working copy)
@@ -2321,8 +2321,6 @@
{
PRInt32 totalSent = 0;
PRInt32 discarded = 0;
- PRBool isBlockCipher;
- int recordIndex;
PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) );
if (len < 0 || !in) {
@@ -2347,12 +2345,7 @@
len--;
discarded = 1;
}
-
- ssl_GetSpecReadLock(ss);
- isBlockCipher = ss->ssl3.cwSpec->cipher_def->type == type_block;
- ssl_ReleaseSpecReadLock(ss);
-
- for (recordIndex = 0; len > totalSent; recordIndex++) {
+ while (len > totalSent) {
PRInt32 sent, toSend;
if (totalSent > 0) {
@@ -2367,28 +2360,6 @@
ssl_GetXmitBufLock(ss);
}
toSend = PR_MIN(len - totalSent, MAX_FRAGMENT_LENGTH);
- if (isBlockCipher &&
- ss->ssl3.cwSpec->version <= SSL_LIBRARY_VERSION_3_1_TLS) {
- /*
- * We assume that block ciphers are used in CBC mode and send
- * only one byte in the first record. This effectively
- * randomizes the IV in a backward compatible way.
- *
- * We get back to the MAX_FRAGMENT_LENGTH record boundary in
- * the second record. So for a large amount of data, we send
- * 1
- * MAX_FRAGMENT_LENGTH - 1
- * MAX_FRAGMENT_LENGTH
- * MAX_FRAGMENT_LENGTH
- * ...
- */
- if (recordIndex == 0) {
- toSend = 1;
- } else if (recordIndex == 1 &&
- len - totalSent > MAX_FRAGMENT_LENGTH) {
- toSend--;
- }
- }
sent = ssl3_SendRecord(ss, content_application_data,
in + totalSent, toSend, flags);
if (sent < 0) {
« no previous file with comments | « net/third_party/nss/patches/cbcrandomiv.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698