summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Add a PDF test to load all the pdfs in a test directory, using the test ↵jam@chromium.org2010-11-171-2/+21
| | | | | | | | server. This tests regressions in loading and crashes. Review URL: http://codereview.chromium.org/5141001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66548 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: A dirty entry can point to a list thatrvargas@google.com2010-11-173-38/+101
| | | | | | | | | | | | | | | is not the actual list where the entry is stored. This CL recognizes that case and hanldes removing that entry from the lists, without saying that there is critical corruption. BUG=38859 TEST=net_unittests Review URL: http://codereview.chromium.org/5119001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66518 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Cleanup file_posix so that it uses the latestrvargas@google.com2010-11-171-159/+74
| | | | | | | | | | | | version of InFlightIO & Co. BUG=55629 TEST=current tests. Review URL: http://codereview.chromium.org/4956001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66497 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add test files for another unit test.rvargas@google.com2010-11-176-0/+92
| | | | | | | | | | BUG=38859 TEST=none Review URL: http://codereview.chromium.org/5112002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66468 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Remove code used to track a crash.rvargas@google.com2010-11-171-8/+0
| | | | | | | | | | BUG=56449 TEST=none Review URL: http://codereview.chromium.org/5124001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66461 0039d316-1c4b-4281-b951-d872f2087c98
* snap_start_tests: test NPN misprediction.agl@chromium.org2010-11-172-6/+75
| | | | | | | | | | | | | | | | | When snap startting, we can hit a case where we predicted that we would negotiation an NPN protocol with a server, but then found that we were wrong. r65837 deal with this from the HTTP stack's point of view. This change adds tests to make sure that we can recover from the misprediction and get it right next time. BUG=none TEST=snap_start_tests http://codereview.chromium.org/4854002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66458 0039d316-1c4b-4281-b951-d872f2087c98
* Remove static "set_fixed_cnonce" in favor of NonceGenerator objects.cbentzel@chromium.org2010-11-175-23/+94
| | | | | | | | | | | Trying to simplify cleanup for more unit tests. BUG=None TEST=net_unittests Review URL: http://codereview.chromium.org/5034001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66439 0039d316-1c4b-4281-b951-d872f2087c98
* Original change: http://codereview.chromium.org/4856003/bulach@chromium.org2010-11-171-2/+2
| | | | | | | | | | | | | | | | (landing on behalf of kristianm) Suppress Android warnings Android generates warnings for comparing signed and unsigned numbers. The ones in this CL should be safe. BUG=62949 TEST=None Review URL: http://codereview.chromium.org/5035002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66420 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor EnsureOpenSSLInit and openssl_util into basejoth@chromium.org2010-11-177-177/+71
| | | | | | | | | | | | This allows the base/crypto methods to call EnsureOpenSSLInit. Also factors out the SSL_CTX and X509_STORE to be more closely associated with their consumers (ssl socket and X509Certificate resp.) rather than process wide globals. BUG=None TEST=None Review URL: http://codereview.chromium.org/4963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66413 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure a cookie can be deleted, even when forced to session only.jochen@chromium.org2010-11-163-7/+48
| | | | | | | | | BUG=63258 TEST=net_unittests --gtest_filter=CookieMonsterTest.ForceSessionOnly Review URL: http://codereview.chromium.org/4967004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66281 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for certificate name checkingjoth@chromium.org2010-11-165-3/+236
| | | | | | | | | | | There's nothing OpenSSL specific about this implementation, other than this is the only platform that does not already supply an implementation of this method. BUG=60719 TEST=net_unittests --gtest_filter=X509CertificateCertificateNameVerifyTest.* Review URL: http://codereview.chromium.org/4184004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66263 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move StringSplitAlongWhitespace to string_split.htfarina@chromium.org2010-11-151-1/+1
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/5004002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66181 0039d316-1c4b-4281-b951-d872f2087c98
* Improve unit test coverage of HttpAuthHandlerDigest parsing.cbentzel@chromium.org2010-11-153-31/+195
| | | | | | | | | | | Also, if the only qop is auth-int, use a different handler since this is not currently handled. BUG=45194 TEST=net_unittests --gtest_filter="*HttpAuthHandlerDigest*" Review URL: http://codereview.chromium.org/4825001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66137 0039d316-1c4b-4281-b951-d872f2087c98
* Reverted because openssl_helper needs to build even on non-openssl buildsjoth@chromium.org2010-11-151-0/+28
| | | | | | | | | | | | | | Revert 66120 - Simplify gyp files by adding a global glob for openssl/nss BUG=None TEST=Build Review URL: http://codereview.chromium.org/4799003 TBR=joth@chromium.org Review URL: http://codereview.chromium.org/5014001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66122 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify gyp files by adding a global glob for openssl/nssjoth@chromium.org2010-11-151-28/+0
| | | | | | | | | BUG=None TEST=Build Review URL: http://codereview.chromium.org/4799003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66120 0039d316-1c4b-4281-b951-d872f2087c98
* base: Get rid of 'using' declaration of StringAppendF.tfarina@chromium.org2010-11-158-26/+32
| | | | | | | | | | | Update the callers to append base:: in the calls to StringAppendF. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/4974001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66116 0039d316-1c4b-4281-b951-d872f2087c98
* Fix openssl build: convert hostname_ and port_ to HostPortPairjoth@chromium.org2010-11-152-10/+6
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/5004001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66115 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 65996 (test breakage) - Disallow Singleton and LazyInstance on ↵willchan@chromium.org2010-11-137-63/+44
| | | | | | | | | | | | | | | | non-joinable threads. Fix all known instances or explicitly allow them. Usually the fix involves switching from Default traits to Lazy traits. BUG=61753 TEST=none Review URL: http://codereview.chromium.org/4635012 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/4980001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66071 0039d316-1c4b-4281-b951-d872f2087c98
* Disallow Singleton and LazyInstance on non-joinable threads.willchan@chromium.org2010-11-127-44/+63
| | | | | | | | | | | Fix all known instances or explicitly allow them. Usually the fix involves switching from Default traits to Lazy traits. BUG=61753 TEST=none Review URL: http://codereview.chromium.org/4635012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65996 0039d316-1c4b-4281-b951-d872f2087c98
* ssl3_PlatformSignHashes should set buf->len to thewtc@chromium.org2010-11-121-3/+3
| | | | | | | | | | | | actual signature length rather than the estimated signature length. R=rsleevi BUG=37560,45369,62027 TEST=none Review URL: http://codereview.chromium.org/4825003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65979 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly handle SSL Client Authentication requests when connectingrch@chromium.org2010-11-1231-159/+179
| | | | | | | | | | | to an HTTPS/SPDY proxy. Modify SSLClientSocket classes to correctly set the host_and_port field of the cert_request_info. Modify HttpNetworkTransaction to use this field when populating the SSL client auth cache. BUG=59292 TEST=HttpProxyClientSocketPoolTest.SslClientAuth Review URL: http://codereview.chromium.org/4339001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65976 0039d316-1c4b-4281-b951-d872f2087c98
* Use DCHECK instead of CHECK to assert that policy_oids_ iswtc@chromium.org2010-11-121-1/+1
| | | | | | | | | | | in ascending order. R=rvargas BUG=41267 TEST=none Review URL: http://codereview.chromium.org/4871001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65964 0039d316-1c4b-4281-b951-d872f2087c98
* NSS: always record the ServerHello data.agl@chromium.org2010-11-121-14/+14
| | | | | | | | | | | | | | | | | Previously, if we predicted a ServerHello (because we were snap startting), then serverHelloPredictionData was set and we wouldn't record the actual ServerHello contents in the event of a misprediction. This meant that we couldn't recover from a misprediction because we would record the same prediction again. With this patch, we'll always write to serverHelloPredictionData, even if we made a prediction. BUG=none TEST=snap_start_unittests git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65947 0039d316-1c4b-4281-b951-d872f2087c98
* Support specifying the GSSAPI library that will be used.danno@chromium.org2010-11-1211-110/+129
| | | | | | | | | | | | This preference can be set either via command-line or via group policy. BUG=53625 TEST=unittests: ConfigurationPolicyPrefStore*; net_unittests: HttpAuthHandlerNegotiateTest.*:HttpAuthGSSAPIPOSIXTest.*; manually: start Chrome with command-line switch --gssapi-library-name=XYZ and see if this results in the Chrome process loading /usr/lib/whatever/XYZ as soon as an authenticated HTTP site is encountered. Review URL: http://codereview.chromium.org/4560001 Patch from Jakob Kummerow <jkummerow@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65939 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using SplitStringDontTrim in NetLogWebSocketHandshakeParameter::ToValue()tyoshino@google.com2010-11-123-18/+72
| | | | | | | | | | | | | | Since key3 may contain some line feeds, we cannot use SplitStringDontTrim. We use this opportunity to make parser recongize only CR+LF as a separator. R=ukai BUG=62918 TEST=Doesn't crash when we open some page using WebSocket and chrome://net-internals. Review URL: http://codereview.chromium.org/4874001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65933 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Added a separate type for a sync server for testserver.pyakalin@chromium.org2010-11-124-93/+141
| | | | | | | | | | | | | Made live_sync_test.cc use its own test server instance. Decomped all sync server code into their own classes (SyncHTTPServer and SyncPageHandler). BUG=53934 TEST=sync integration tests Review URL: http://codereview.chromium.org/4209002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65893 0039d316-1c4b-4281-b951-d872f2087c98
* Fix python sync server on Chrome OSrsimha@chromium.org2010-11-121-4/+4
| | | | | | | | | | | | | | | | | Bug 58522 was logged because bringing up the python sync server on Mac failed due to a mismatch in the path to the protobuf files. We recently noticed the same issue on our Chrome OS autotest runs as well. This patch modifies the workaround checked in with http://src.chromium.org/viewvc/chrome?view=rev&revision=62335 so that it applies to Chrome OS as well. BUG=60637, 58522 TEST=sync_integration_tests on Chrome OS Review URL: http://codereview.chromium.org/4133001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65880 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new test to HttpNetworkTransaction that testsrch@chromium.org2010-11-121-0/+107
| | | | | | | | | | | HTTP Basic Proxy Auth over SPDY. BUG=none TEST=HttpNetworkTransactionTest.HttpsProxySpdyGetWithProxyAuth Review URL: http://codereview.chromium.org/4389001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65877 0039d316-1c4b-4281-b951-d872f2087c98
* Restrict file protocol on chromeos to certain whitelisted directories. ↵achuith@chromium.org2010-11-118-6/+76
| | | | | | | | | | | Disable this for tests. BUG=chromium-os:3412 TEST=Access file: directories on chromeos. browser, ui, interactive ui and unit tests should continue to pass. Review URL: http://codereview.chromium.org/4160003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65866 0039d316-1c4b-4281-b951-d872f2087c98
* We should use SSLInfo or related types for HTTPSwtc@chromium.org2010-11-111-8/+8
| | | | | | | | | | | URLs only. R=eroman,finnur BUG=53366 TEST=net_unittests --gtest_filter=HTTPSRequestTest.HTTPS*Test Review URL: http://codereview.chromium.org/4210004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65864 0039d316-1c4b-4281-b951-d872f2087c98
* testserver.py listens on ephemeral ports by default.cbentzel@chromium.org2010-11-115-86/+93
| | | | | | | | | | | | | If --port is specified on the command line, testserver.py will listen on that port, otherwise it will listen on an ephemeral port. If --startup_pipe is specified, the port number is written to the pipe as a 2 byte unsigned int in host order. TestServer spawns testserver.py to listen on an ephemeral port and reads the port value from the pipe. A fixed port can not be specified. BUG=56814 TEST=try bots pass Review URL: http://codereview.chromium.org/4733005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65843 0039d316-1c4b-4281-b951-d872f2087c98
* net: restart on NPN misprediction and add tests for Snap Start errors.agl@chromium.org2010-11-113-1/+103
| | | | | | | | | | | | | | | | Restart an HTTP load when we mispredict the NPN protocol in a Snap Start connection. Also, test the behaviour of the HTTP layer when SSL errors result from the first Write() call. When we are doing Snap Start, we need to merge the first application data record into the ClientHello. Thus the SSL socket will report that it has connected immedately in order to get a Write() call. This means that some errors, which would typically result from the Connect(), are now returned on the first Write(). BUG=none TEST=net_unittests git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65837 0039d316-1c4b-4281-b951-d872f2087c98
* All SSL UI tests work with ephemeral ports.cbentzel@chromium.org2010-11-113-16/+65
| | | | | | | | | | | | | This also changes the testserver text replacement hooks to accept base64 encoded pairs, and to support multiple replacement texts. These changes were needed for some of the "ssl/top_frame.html" based tests, which contained a frame with an HTML page referencing three URLs on three tdifferent test servers. BUG=56814 TEST=browser_tests --gtest_filter="*SSLUI*" Review URL: http://codereview.chromium.org/4664009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65819 0039d316-1c4b-4281-b951-d872f2087c98
* net: add mit.edu to False Start blacklist.agl@chromium.org2010-11-111-0/+1
| | | | | | Based on private communication with davidben. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65808 0039d316-1c4b-4281-b951-d872f2087c98
* openssl build fixes, and tidy the build filesjoth@chromium.org2010-11-112-2/+6
| | | | | | | | | | | Split out of http://codereview.chromium.org/4691003/ BUG=None TEST=builds... Review URL: http://codereview.chromium.org/4696004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65801 0039d316-1c4b-4281-b951-d872f2087c98
* Add device management test server to net infrastructure.mnissler@chromium.org2010-11-114-1/+347
| | | | | | | | | | | This adds a simple device management server implementation written in python that's useful for unit tests and local testing. BUG=62318 TEST=Compiles and browser tests in device_management_backend_browsertest succeed Review URL: http://codereview.chromium.org/4659002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65783 0039d316-1c4b-4281-b951-d872f2087c98
* Enable extra logging when using client certificates on Windows via NSSrsleevi@chromium.org2010-11-111-0/+48
| | | | | | | | | BUG=62027 TEST=None Review URL: http://codereview.chromium.org/4709005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65778 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for restricting the cipher suites that SSLClientSocket(Mac,NSS) ↵rsleevi@chromium.org2010-11-119-53/+242
| | | | | | | | | | | | use. Restricting SSLClientSocketWin is handled by the existing Windows system policy (which deals in algorithms, not cipher suites). R=wtc BUG=58831 TEST=SSLClientSocketTest.CipherSuiteDisables Review URL: http://codereview.chromium.org/3845005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65773 0039d316-1c4b-4281-b951-d872f2087c98
* Change the way request headers are logged to the NetLog to ensurerch@chromium.org2010-11-1111-56/+132
| | | | | | | | | | | | | | | | | | that the complete request is logged, not just the extra_headers. Before I broke things, HttpNetworkTransaction was attempting to do the logging, but after some refactors it no longer has access to the final request. SpdySession already logs correctly in the SPDY case, and I modified HttpBasicStream to log in the HTTP case. Added unit tests is both HttpNetworkTransactionTest and SpdyNetworkTransactionTest. BUG=48962 TEST=net_unittests --gtest_filter=HttpNetworkTransactionTest.SimpleGET\* Review URL: http://codereview.chromium.org/4644003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65736 0039d316-1c4b-4281-b951-d872f2087c98
* Valgrind fix.agl@chromium.org2010-11-101-0/+1
| | | | | | | | | I forgot to init a member in r65677. BUG=none TEST=valgrind git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65724 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert "net: add Snap Start tests""agl@chromium.org2010-11-103-0/+590
| | | | | | | | | | | | | | | | | | (Reland. First landed in r65714, reverted in r65715.) These tests are Linux only for now. Adding Mac support should be pretty easy. However, Windows will be tough to do without making the tests flakey. Given the huge amounts of pain caused by testserver.py and ephemeral ports I'd rather get the tests working well on a couple of platforms (since the Snap Start code is all platform-generic anyway), then add more flakiness. BUG=none TEST=snap_start_unittests http://codereview.chromium.org/4524003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65720 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "net: add Snap Start tests"agl@chromium.org2010-11-103-590/+0
| | | | | | | | | | This reverts commit r65714. It broke the Linux shared library builders: SOLINK(target) out/Debug/obj.target/net/libnet_base.so /usr/bin/ld: error: out/Debug/obj.target/openssl/third_party/openssl/openssl/crypto/sha/sha512t.o: multiple definition of 'main' /usr/bin/ld: out/Debug/obj.target/openssl/third_party/openssl/openssl/crypto/sha/sha256t.o: previous definition here git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65715 0039d316-1c4b-4281-b951-d872f2087c98
* net: add Snap Start testsagl@chromium.org2010-11-103-0/+590
| | | | | | | | | | | | | | | | These tests are Linux only for now. Adding Mac support should be pretty easy. However, Windows will be tough to do without making the tests flakey. Given the huge amounts of pain caused by testserver.py and ephemeral ports I'd rather get the tests working well on a couple of platforms (since the Snap Start code is all platform-generic anyway), then add more flakiness. BUG=none TEST=snap_start_unittests http://codereview.chromium.org/4524003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65714 0039d316-1c4b-4281-b951-d872f2087c98
* net: assorted changes needed for Snap Start tests.agl@chromium.org2010-11-1011-19/+68
| | | | | | | | | | | | | | | | | | | | In IsAllowedBadCert, the pointer compare doesn't always work. Creating a certificate by X509Certificate::CreateFromBytes and putting it in the allowed bad list doesn't match the same certificate from a server. InvalidateSessionIfBadCertificate: I'm sure that there's history here that I don't know, so please review carefully. In order to test resumption against a server with a test certificate we need to avoid destroying the session. ClearSessionCache, AdoptSocket: only for testing BUG=none TEST=none http://codereview.chromium.org/4558004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65713 0039d316-1c4b-4281-b951-d872f2087c98
* sync: bake 'explicit' passphrases into the nigori specifics, rathertim@chromium.org2010-11-101-0/+14
| | | | | | | | | | | | | | | than using a local-only preference. Tries to deal with migration from local pref, but some weird cases might require the nuclear option to totally clean things up, since we were erroneously setting the pref even when you would be in "gaia passphrase" mode. Fixes the "same passphrase as gaia password" bug for new users. BUG=62103, 60827, 59867 TEST=unit_tests, integration tests Review URL: http://codereview.chromium.org/4632001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65697 0039d316-1c4b-4281-b951-d872f2087c98
* net: add code for encrypting DNS cert check uploads.agl@chromium.org2010-11-101-1/+137
| | | | | | | | | | | (This code isn't live yet.) BUG=none TEST=none http://codereview.chromium.org/4698003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65677 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup style nits in SSLClientSocketTestrsleevi@chromium.org2010-11-101-101/+55
| | | | | | | | | | R=wtc BUG=none TEST=SSLClientSocketTest* Review URL: http://codereview.chromium.org/4130005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65626 0039d316-1c4b-4281-b951-d872f2087c98
* Remove "using namespace std" which is illegal per style guide.pkasting@chromium.org2010-11-101-110/+113
| | | | | | | | | | Also remove the other using directives, most of which were already explicitly qualified at various places in the file anyway. BUG=none TEST=none Review URL: http://codereview.chromium.org/4660009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65618 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure the generated python proto buff path is right.lzheng@chromium.org2010-11-093-26/+37
| | | | | | | | BUG=62415 TEST=mac trybot green with safe_browsing_tests Review URL: http://codereview.chromium.org/4677002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65574 0039d316-1c4b-4281-b951-d872f2087c98
* Make GConf dependency optional.phajdan.jr@chromium.org2010-11-091-0/+6
| | | | | | | | | | | This is upstreaming a Gentoo Linux patch. BUG=13322 TEST=none Review URL: http://codereview.chromium.org/4691001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65507 0039d316-1c4b-4281-b951-d872f2087c98