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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 164542: DoPayloadRead should ignore PR_END_OF_FILE_ERROR from PR_Read, which... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Update to the current trunk Created 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_nss.cc
===================================================================
--- net/socket/ssl_client_socket_nss.cc (revision 29040)
+++ net/socket/ssl_client_socket_nss.cc (working copy)
@@ -956,8 +956,19 @@
LeaveFunction("");
return ERR_IO_PENDING;
}
+ int net_error;
+ if (prerr == PR_END_OF_FILE_ERROR) {
+ // TODO(wtc): Unless we have received the close_notify alert, we need to
+ // return an error code indicating that the SSL connection ended
+ // uncleanly, a potential truncation attack. See http://crbug.com/18586.
+ LOG(WARNING) << "SSL connection closed without close_notify";
+ LogData(user_read_buf_->data(), 0);
+ net_error = 0;
+ } else {
+ net_error = NetErrorFromNSPRError(prerr);
+ }
LeaveFunction("");
- return NetErrorFromNSPRError(prerr);
+ return net_error;
}
int SSLClientSocketNSS::DoPayloadWrite() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698