summaryrefslogtreecommitdiffstats
path: root/net/socket
Commit message (Collapse)AuthorAgeFilesLines
* Move LoadTemporaryCert to the new files cert_test_util.{h,cc} andwtc@chromium.org2010-03-172-105/+11
| | | | | | | | | | | | rename it LoadTemporaryRootCert, so that it can be used by x509_certificate_unittest.cc. R=eroman BUG=none TEST=No compilation and test failures. Review URL: http://codereview.chromium.org/997006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41794 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Ignoring optional client-cert requests from serversnej@chromium.org2010-03-161-24/+76
| | | | | | | | | BUG=37765 TEST=none Review URL: http://codereview.chromium.org/746002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41742 0039d316-1c4b-4281-b951-d872f2087c98
* Try to fix some regressions after landing 41689.eroman@chromium.org2010-03-161-11/+4
| | | | | | | | | | The changes to passive_log_collector.cc are a speculative fix for crash seen in dom_perf. TBR=willchan Review URL: http://codereview.chromium.org/969004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41695 0039d316-1c4b-4281-b951-d872f2087c98
* Generalize the net module's LoadLog facility from a passive container, to an ↵eroman@chromium.org2010-03-1629-378/+387
| | | | | | | | | | | | | | | | event stream (NetLog). This makes it possible to associate a single NetLog with a URLRequestContext, and then attach observers to that log to watch the stream of events. This changelist attempts to do the most direct translation, so there will be subsequent iterations to clean up. The user-visible behavior should remain unchanged. BUG=37421 Review URL: http://codereview.chromium.org/848006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41689 0039d316-1c4b-4281-b951-d872f2087c98
* When connect takes too long for a new socket group, issue a singlembelshe@chromium.org2010-03-145-19/+277
| | | | | | | | | | | | backup socket request to retry the connect. This reduces latency in the presence of packet loss. BUG=36629 TEST=TCPClientSocketPoolTest.BackupSocket* Review URL: http://codereview.chromium.org/842004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41543 0039d316-1c4b-4281-b951-d872f2087c98
* When using NSS for SSL on Windows, fall back on SSLClientSocketWinwtc@chromium.org2010-03-124-14/+102
| | | | | | | | | | | | | if the server requests a client certificate. This is an interim solution until we modify SSLClientSocketNSS to use CryptoAPI to do SSL client authentication. R=mbelshe BUG=37560 TEST=SSL client authentication should continue to work on Windows. Review URL: http://codereview.chromium.org/795006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41444 0039d316-1c4b-4281-b951-d872f2087c98
* win: string_util.h -> utf_string_conversions.h fix.jhawkins@google.com2010-03-111-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/830002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41292 0039d316-1c4b-4281-b951-d872f2087c98
* Add checks to track down bug 31096vandebo@chromium.org2010-03-081-0/+2
| | | | | | | | | BUG=31096 TEST=none Review URL: http://codereview.chromium.org/669226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40934 0039d316-1c4b-4281-b951-d872f2087c98
* Thread-safety for X509Certificate's intermediate-certs list.snej@chromium.org2010-03-054-46/+41
| | | | | | | | | BUG=32553,30001 TEST=none Review URL: http://codereview.chromium.org/661223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40797 0039d316-1c4b-4281-b951-d872f2087c98
* Always call SSLSetPeerDomainName. The SSLSetPeerDomainName call waswtc@chromium.org2010-03-051-8/+7
| | | | | | | | | | | put inside an if statement by mistake. R=snej BUG=30684 TEST=none Review URL: http://codereview.chromium.org/669207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40794 0039d316-1c4b-4281-b951-d872f2087c98
* SSLClientSocketNSS::ClientAuthHandler should return SECWouldBlockwtc@chromium.org2010-03-051-2/+4
| | | | | | | | | | | | | | instead of SECFailure when we want to abort the handshake, because SECWouldBlock causes NSS to suspend the client authentication, whereas SECFailure causes NSS to continue the handshake with an empty certificate (in TLS) or no_certificate alert (in SSL 3.0). R=agl BUG=16830 TEST=SSL client authentication on Linux should still work. Review URL: http://codereview.chromium.org/669198 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40785 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Work around SSL renegotiation problems with client certs.snej@chromium.org2010-03-051-10/+15
| | | | | | | | | | I've gotten several sites (startcom and foaf.me) to work by aborting the connection on renegotiation, telling the caller to ask for a client cert, and then when a client cert is provided not enabling break-on-auth. BUG=36207 TEST=none Review URL: http://codereview.chromium.org/669110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40762 0039d316-1c4b-4281-b951-d872f2087c98
* Revert my last commit 'cause it breaks net unit tests on OS X 10.6 :(snej@chromium.org2010-03-054-41/+46
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40743 0039d316-1c4b-4281-b951-d872f2087c98
* Thread-safety for X509Certificate's intermediate-certs list.snej@chromium.org2010-03-054-46/+41
| | | | | | | | | BUG=32553,30001 TEST=none Review URL: http://codereview.chromium.org/661223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40742 0039d316-1c4b-4281-b951-d872f2087c98
* Annotate a harmless data race in TcpPingertimurrrr@chromium.org2010-03-041-1/+5
| | | | | | Review URL: http://codereview.chromium.org/668057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40622 0039d316-1c4b-4281-b951-d872f2087c98
* A follow-up to r40192. Change the log message to avoid confusion.wtc@chromium.org2010-03-031-1/+1
| | | | | | | | | | | The original log message sounded like SSL renegotiation was attempted. R=abarth BUG=none TEST=none Review URL: http://codereview.chromium.org/666011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40554 0039d316-1c4b-4281-b951-d872f2087c98
* A follow-up of r28664.wtc@chromium.org2010-03-032-13/+11
| | | | | | | | | | | | | | | | | | | | Remove the unused member completed_handshake_. In OnHandshakeIOComplete, correct the comments to note that we also notify the caller of success. We cannot DCHECK renegotiating_ is true because DidCompleteRenegotiation has reset it to false. Instead, DCHECK the equivalent conditions in DidCompleteRenegotiation. Log the end of TYPE_SSL_CONNECT only for initial handshakes. In DoCompletedRenegotiation, result may not be OK. R=mbelshe BUG=none TEST=none Review URL: http://codereview.chromium.org/666004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40550 0039d316-1c4b-4281-b951-d872f2087c98
* Use CHECK_* in netwillchan@chromium.org2010-03-024-11/+11
| | | | | | Review URL: http://codereview.chromium.org/660404 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40453 0039d316-1c4b-4281-b951-d872f2087c98
* SSL False Start Supportagl@chromium.org2010-03-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * Adds TLS false start support. This allows us to start sending encrypted data before we have validated the server's Finished message. (This behaviour is already enabled on Android.) I've verified that this works using netem to add a 200ms delay on the loopback adaptor. I've also checked that an incorrect Finished message from the server causes an error by hacking the Go TLS server. Beware when looking at packet traces that the time taken in NSS's SQLite calls can exceed the RTT of the connection and make it appear that this code isn't functioning. * Adds DEBUG and TRACE defines to libssl when building Chromium in Debug mode. This means that setting SSLTRACE in the environment now works for debug builds. (Reland. First landed in r39905, reverted in r40024 because it uncovered a bug. Then landed in r40124 and reverted in r40126 because the faster SSL handshakes made a flake UI test worse. UI test fixed in r40285.) http://codereview.chromium.org/518065 BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40438 0039d316-1c4b-4281-b951-d872f2087c98
* Remove connection failed histograms.vandebo@chromium.org2010-03-024-13/+16
| | | | | | | | | BUG=none - not used and blocks refactoring for bug 30357 TEST=unit tests Review URL: http://codereview.chromium.org/661318 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40397 0039d316-1c4b-4281-b951-d872f2087c98
* Fix infinite loop in ClientSocketPoolBase::DoReleaseSocket.willchan@chromium.org2010-03-022-3/+55
| | | | | | | | BUG=36871 Review URL: http://codereview.chromium.org/660353 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40395 0039d316-1c4b-4281-b951-d872f2087c98
* Delete an unused test fixture.willchan@chromium.org2010-03-021-7/+0
| | | | | | Review URL: http://codereview.chromium.org/660347 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40348 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix the case where the browser livelocks if we cannot open a file."agl@chromium.org2010-03-011-6/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40291 0039d316-1c4b-4281-b951-d872f2087c98
* Work around 3rd party problem causing bug 27870.vandebo@chromium.org2010-02-271-10/+27
| | | | | | | | | | | | Check that we report that we wrote no more than we requested to write. Remove some debugging. BUG=27870 TEST=none Review URL: http://codereview.chromium.org/660194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40197 0039d316-1c4b-4281-b951-d872f2087c98
* Log an informational message if an SSL server does not supportwtc@chromium.org2010-02-272-0/+20
| | | | | | | | | | | | | | | | SSL secure renegotiation. R=abarth BUG=none TEST=Run Chrome witl logging enabled. Visit https://www.google.com/. An informational message like [1812:8012:351987676:INFO:ssl_client_socket_nss.cc(651)] The server www.google.com does not support SSL secure renegotiation. should be logged. Then visit https://ssltls.de/. No such informational message should be logged. Review URL: http://codereview.chromium.org/660144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40192 0039d316-1c4b-4281-b951-d872f2087c98
* Make a proper TCPSocketParamsvandebo@chromium.org2010-02-274-48/+69
| | | | | | | | | BUG=none TEST=existing unit tests Review URL: http://codereview.chromium.org/661194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40182 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the case where the browser livelocks if we cannot open a file.agl@chromium.org2010-02-261-0/+6
| | | | | | | | | | | | | | | | | | | | If one tries to upload a file that one doesn't have read access to, the browser livelocks. It tries to read from the file, gets nothing but spins forever because it knows that it hasn't finished reading. To address this, firstly we add a check at stat() time to make sure that we can read the file. However, this doesn't take care of the case where the access() call was incorrect, or the permissions have changed under us. In this case, we replace the missing file with NULs. (Land attempt three: first in r39446, reverted in r39448. Second in r39899, reverted in r39901.) http://codereview.chromium.org/541022 BUG=30850 TEST=Try to upload a file that isn't readable (i.e. /etc/shadow). The resulting upload should be a 0 byte file. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40146 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "SSL False Start Support"agl@chromium.org2010-02-261-6/+0
| | | | | | | (Again. Looks like it might have uncovered another issue but I'm about to go to lunch and I don't want to leave the tree red.) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40126 0039d316-1c4b-4281-b951-d872f2087c98
* SSL False Start Supportagl@chromium.org2010-02-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Adds TLS false start support. This allows us to start sending encrypted data before we have validated the server's Finished message. (This behaviour is already enabled on Android.) I've verified that this works using netem to add a 200ms delay on the loopback adaptor. I've also checked that an incorrect Finished message from the server causes an error by hacking the Go TLS server. Beware when looking at packet traces that the time taken in NSS's SQLite calls can exceed the RTT of the connection and make it appear that this code isn't functioning. * Adds DEBUG and TRACE defines to libssl when building Chromium in Debug mode. This means that setting SSLTRACE in the environment now works for debug builds. (Reland. First landed in r39905, reverted in r40024 because it uncovered a bug.) http://codereview.chromium.org/518065 BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40124 0039d316-1c4b-4281-b951-d872f2087c98
* Handle the TLS no_renegotiation alert message.wtc@chromium.org2010-02-251-0/+8
| | | | | | | | | | | R=agl BUG=36835 TEST=Visit https://ssltls.de:1445/otherciphers/ffs.jpg on Windows. The error page should display the error code ERR_SSL_NO_RENEGOTIATION instead of ERR_FAILED. Review URL: http://codereview.chromium.org/652007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40067 0039d316-1c4b-4281-b951-d872f2087c98
* SSL: stop network traffic from interfering with NSS.wtc@chromium.org2010-02-251-2/+2
| | | | | | | | | | | | Patch written by Adam Langley of Google. Original review URL: http://codereview.chromium.org/661108 R=wtc BUG=36770 TEST=none Review URL: http://codereview.chromium.org/660131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40066 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "SSL False Start Support"agl@chromium.org2010-02-251-6/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40024 0039d316-1c4b-4281-b951-d872f2087c98
* Include sys_addrinfo.h in tcp_client_socket_win.cc.eroman@chromium.org2010-02-251-0/+1
| | | | | | | | | | | | With some versions of the windows SDK (6.1) the definition for struct addrinfo comes from ws2tcpip.h, and in others ws2def.h. By including sys_addrinfo.h we get this to work in both cases. BUG=none TEST=none Review URL: http://codereview.chromium.org/660068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39986 0039d316-1c4b-4281-b951-d872f2087c98
* Add TLS server_name extension support for Mac Chrome.wtc@chromium.org2010-02-241-0/+8
| | | | | | | | | | | | | | | | | | This enables server name indication (SNI) support. Patch written by Paul Kehrer <paul.l.kehrer@gmail.com>. Original review URL: http://codereview.chromium.org/656024 R=wtc BUG=30684 TEST=Go to https://carol.sni.velox.ch/ or https://xn--k4h.ws (an IDN SNI site Paul Kehrer uses for testing). Without the patch the latter will throw up a cert error, while the former will have text stating that the server_name extension is not present. Review URL: http://codereview.chromium.org/660005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39934 0039d316-1c4b-4281-b951-d872f2087c98
* SSL False Start Supportagl@chromium.org2010-02-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | * Adds TLS false start support. This allows us to start sending encrypted data before we have validated the server's Finished message. (This behaviour is already enabled on Android.) I've verified that this works using netem to add a 200ms delay on the loopback adaptor. I've also checked that an incorrect Finished message from the server causes an error by hacking the Go TLS server. Beware when looking at packet traces that the time taken in NSS's SQLite calls can exceed the RTT of the connection and make it appear that this code isn't functioning. * Adds DEBUG and TRACE defines to libssl when building Chromium in Debug mode. This means that setting SSLTRACE in the environment now works for debug builds. http://codereview.chromium.org/518065 BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39905 0039d316-1c4b-4281-b951-d872f2087c98
* Mac client-side SSL cert improvements.snej@chromium.org2010-02-241-1/+2
| | | | | | | | | | | Allow Netscape-style client certs. Remember which identity the user chooses for a domain, and put it at the top of the list next time. BUG=36316,36446 TEST=none Review URL: http://codereview.chromium.org/651090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39904 0039d316-1c4b-4281-b951-d872f2087c98
* Really connect to the same server in FTP network transaction.phajdan.jr@chromium.org2010-02-2019-78/+79
| | | | | | | | | | | | Also create necessary infrastructure to know the address a client socket is connected to. TEST=Covered by net_unittests. BUG=35670 Review URL: http://codereview.chromium.org/598071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39559 0039d316-1c4b-4281-b951-d872f2087c98
* Make dynamic access to SSLSetSessionOption static.mark@chromium.org2010-02-191-1/+1
| | | | | | | | | | It's not often that you can make something both dynamic and static. BUG=16831 TEST=none Review URL: http://codereview.chromium.org/651055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39485 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SSLSessionOption's name. It's not SSLSetSessionOptionType.mark@chromium.org2010-02-191-2/+2
| | | | | | | | | | | | Getting the name right is important if this code is to compile with both the 10.5 SDK (where we define the type) and the 10.6 SDK (where the system defines it). The error was introduced in r39389. BUG=16831 TEST=10.6 SDK build Review URL: http://codereview.chromium.org/651044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39467 0039d316-1c4b-4281-b951-d872f2087c98
* Pulled out Callback code into base/callback.h. This is the first step ↵akalin@chromium.org2010-02-194-1/+6
| | | | | | | | | | | | | towards redoing the Callback interfaces. Added and removed includes as needed. BUG=35223 TEST=trybots Review URL: http://codereview.chromium.org/646061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39419 0039d316-1c4b-4281-b951-d872f2087c98
* Client-side SSL cert support for Mac.snej@chromium.org2010-02-182-56/+123
| | | | | | | | | | This includes sending an existing identity cert, and asking the user which cert to use. Doesn't yet handle SSL renegotiation, or key-gen. BUG=16831 TEST=none Review URL: http://codereview.chromium.org/604067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39389 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: disable revocation checking.agl@chromium.org2010-02-181-1/+15
| | | | | | | | | | | | | | | For benchmarking we would like to pretend that we're in a world with OCSP stapling and OCSP disk caches etc. Since we currently don't check certificates with SPDY anyway, it's no loss if we don't check OCSP either. This change needs to be reverted when we start checking certificates. Hopefully by then we'll have a better OCSP world to live in. BUG=32020 TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39314 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid trying to kill a process that has already quit.tommi@chromium.org2010-02-161-1/+5
| | | | | | | | | TEST=This is to reduce false positive "Unable to terminate process" log entries in unit tests. BUG=none Review URL: http://codereview.chromium.org/600108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39097 0039d316-1c4b-4281-b951-d872f2087c98
* More checks to try to find bug 27870.vandebo@google.com2010-02-121-1/+9
| | | | | | | | | BUG=27870 TEST=none Review URL: http://codereview.chromium.org/604022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38857 0039d316-1c4b-4281-b951-d872f2087c98
* Add the ssl_client_socket_nss_factory.h header and declarewtc@chromium.org2010-02-093-7/+20
| | | | | | | | | | | | | | | | | the SSLClientSocketNSSFactory function there. Put the --use-nss-for-ssl command-line switch inside ifdefs for the platforms that need it. Call EnsureNSPRInit on the main thread so that PR_Cleanup will be called on the main thread. R=mark BUG=28744 TEST=No build errors. Review URL: http://codereview.chromium.org/573041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38515 0039d316-1c4b-4281-b951-d872f2087c98
* Add bounds checking to StaticSocketDataProvider, to make tests more reliablephajdan.jr@chromium.org2010-02-094-43/+77
| | | | | | | | | | | when they fail. TEST=net_unittests BUG=27567 Review URL: http://codereview.chromium.org/582020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38453 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ClientSocketPoolBaseHelper to maintain order properly.willchan@chromium.org2010-02-083-64/+113
| | | | | | | | | It used to be the case that when a disconnected socket is released, it would pop the front of the queue, and since it was a disconnected socket, would kick off another ConnectJob and then append the request to the back to the queue. While doing this, I cleaned up the TYPE_SOCKET_WAITING_IN_QUEUE since it doesn't make sense. You're always waiting in a queue, unless the request gets fulfilled immediately. I've added strings to the LoadLog to distinguish this situation and also identify when the socket has been reused. Review URL: http://codereview.chromium.org/583002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38408 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the HostResolver::Shutdown() method.eroman@chromium.org2010-02-051-1/+0
| | | | | | | | | | | While this doesn't entirely remove the hack, it limits the scope of it to HostResolverImpl. Hopefully in the future HostResolver will not be refcounted so this can go away altogether. BUG=18373 Review URL: http://codereview.chromium.org/569035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38243 0039d316-1c4b-4281-b951-d872f2087c98
* Add specific error codes for when SOCKS connect fails.eroman@chromium.org2010-02-054-21/+28
| | | | | | | | | | | | | This also fixes HttpNetworkTransaction to fallback to the next proxy after a failure is encountered using a SOCKS proxy server. Note that I decided against using finer granularity error codes, since it just adds a higher maintenance cost to ReconsiderProxyAfterError(). Power users can get better information on the cause of the failure by looking at the LoadLog anyway. BUG=34386 Review URL: http://codereview.chromium.org/567030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38170 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the NetworkChangeNotifier to HostResolver.willchan@chromium.org2010-02-049-15/+17
| | | | | | | | | | | | | | | This requires the following refactors: (1) NetworkChangeNotifier moves out of HttpNetworkSession into IOThread. (2) HostResolver gets initialized with NetworkChangeNotifier. (3) NetworkChangeNotifier needs to get passed into HttpCache and HttpNetworkSession (required updating a lot of files). (4) NetworkChangeNotifier is no longer reference counted. It is owned by IOThread. (5) IOThread gains a new struct: Globals. It can only be used on the io thread. (6) ChromeURLRequestContextFactory uses IOThread::Globals to initialize ChromeURLRequest objects with the host resolver and network change notifier. BUG=26159 Review URL: http://codereview.chromium.org/552117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38052 0039d316-1c4b-4281-b951-d872f2087c98