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

Side by Side Diff: net/http/http_network_transaction.cc

Issue 118410: We don't handle certificate errors during SSL renegotiation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 6 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
« no previous file with comments | « net/base/ssl_client_socket_win.cc ('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 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/field_trial.h" 9 #include "base/field_trial.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 return ERR_EMPTY_RESPONSE; 738 return ERR_EMPTY_RESPONSE;
739 } 739 }
740 740
741 // Assume everything else is a HTTP/0.9 response (including responses 741 // Assume everything else is a HTTP/0.9 response (including responses
742 // of 'h', 'ht', 'htt'). 742 // of 'h', 'ht', 'htt').
743 header_buf_body_offset_ = 0; 743 header_buf_body_offset_ = 0;
744 return OK; 744 return OK;
745 } 745 }
746 746
747 int HttpNetworkTransaction::DoReadHeadersComplete(int result) { 747 int HttpNetworkTransaction::DoReadHeadersComplete(int result) {
748 if (using_ssl_ && IsCertificateError(result)) {
749 // We don't handle a certificate error during SSL renegotiation, so we
750 // have to return an error that's not in the certificate error range
751 // (-2xx).
752 LOG(ERROR) << "Got a server certificate with error " << result
753 << " during SSL renegotiation";
754 result = ERR_CERT_ERROR_IN_SSL_RENEGOTIATION;
755 }
756
748 if (result < 0) 757 if (result < 0)
749 return HandleIOError(result); 758 return HandleIOError(result);
750 759
751 if (result == 0 && ShouldResendRequest()) { 760 if (result == 0 && ShouldResendRequest()) {
752 ResetConnectionAndRequestForResend(); 761 ResetConnectionAndRequestForResend();
753 return result; 762 return result;
754 } 763 }
755 764
756 // Record our best estimate of the 'response time' as the time when we read 765 // Record our best estimate of the 'response time' as the time when we read
757 // the first bytes of the response headers. 766 // the first bytes of the response headers.
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 host_and_port = proxy_info_.proxy_server().host_and_port(); 1625 host_and_port = proxy_info_.proxy_server().host_and_port();
1617 } else { 1626 } else {
1618 DCHECK(target == HttpAuth::AUTH_SERVER); 1627 DCHECK(target == HttpAuth::AUTH_SERVER);
1619 host_and_port = GetHostAndPort(request_->url); 1628 host_and_port = GetHostAndPort(request_->url);
1620 } 1629 }
1621 auth_info->host_and_port = ASCIIToWide(host_and_port); 1630 auth_info->host_and_port = ASCIIToWide(host_and_port);
1622 response_.auth_challenge = auth_info; 1631 response_.auth_challenge = auth_info;
1623 } 1632 }
1624 1633
1625 } // namespace net 1634 } // namespace net
OLDNEW
« no previous file with comments | « net/base/ssl_client_socket_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698