chromium/src/net.git
17 min agoLand Recent QUIC Changes. master
rtenneti@chromium.org [Sat, 2 Aug 2014 06:15:37 +0000 (06:15 +0000)]
Land Recent QUIC Changes.

Add case for PING frame in QuicFrame <<.

Merge internal change: 71908470
https://codereview.chromium.org/421963006/

Add methods to the QuicConnectionDebug visitor for tracking various
events which cause a QuicConnection to discard a packet.

Merge internal change: 71871881
https://codereview.chromium.org/421913015/

Change ReliableQuicStream::OnStreamFrame to return void since the method
already closes the connection when there are errors and callers are not
checking the return value

Make QuicStreamSequencer::OnStreamFrame return void instead of bool
since it is already closing the connect or resetting the stream when
there is an error.

Make two QUIC methods return void instead of bool.

Merge internal change: 71870242
https://codereview.chromium.org/420393004/

Create a visitor which can allow using both a trace... visitor and the
existing stats visitor.

Changed QuicConnection's QuicConnectionDebugVisitor to a scoped_ptr.

Merge internal change: 71863508
https://codereview.chromium.org/429453003/

Use 1350 byte QUIC packets by default.

Merge internal change: 71837432
https://codereview.chromium.org/427673005/

Improve debug logging of QUIC crypto handshake.

Merge internal change: 71833151
https://codereview.chromium.org/428803002/

Fix a bug in QuicUnackedPacketMap where an in flight packet could be
removed before being removed from bytes_in_flight.

Merge internal change: 71783653
https://codereview.chromium.org/422123005/

Inline the members of QUIC's ReceivedPacketInfo into QuicAckFrame now
that version 15 is gone.

Merge internal change: 71763611
https://codereview.chromium.org/424003002/

Remove FixRate congestion frame type.

Merge internal change: 71746617
https://codereview.chromium.org/424903002/

Remove QUIC_VERSION_15 now that Chrome Stable supports QUIC_VERSION_16.

Merge internal change: 71718286
https://codereview.chromium.org/413403008/

R=rch@chromium.org
TBR=thestig@chromium.org

Review URL: https://codereview.chromium.org/420313005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@287168 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 hours agoLand Recent QUIC Changes
rtenneti@chromium.org [Fri, 1 Aug 2014 18:42:39 +0000 (18:42 +0000)]
Land Recent QUIC Changes

Fix to QUIC's RttStats ExpireSmoothedMetrics where the mean deviation
may increase if the rtt decreased.

Merge internal change: 71665066
https://codereview.chromium.org/406403002/

Allow client to request Reno congestion control.

Disabled BBR tests (will enable after BBR code is checked in).

Merge internal change: 71621257
https://codereview.chromium.org/412753002/

QUIC - Minor cleanup change to keep internal source tree and chromium
codebase in sync.

+ Use DECHEK_EQ instead of DCHECK.

Merge internal change: 71613624
https://codereview.chromium.org/412733002/

Allow QuicConnection to own its QuicPacketWriter

Added a new "bool owns_writer" parameter to the QuicConnection
constructor that specifies whether the QuicConnection has ownership.
Also cleaned up the ownership semantics in a number of tests --
previously, the writer was not actually outliving the connection.

Merge internal change: 71590341
https://codereview.chromium.org/413573003/

Added QuicTime::Infinite() to create infinite time required by the
following internal change.

Change QUIC"s BBR sender to only fall out of slow start when there is a
packet loss if the residual is less than 0.25.

Merge internal change: 71436337
https://codereview.chromium.org/410743003/

Ensure the UnackedPacketMap only keeps one previous transmission less
than largest_observed.

Also improves the tightness of QuicUnackedPacketMapTest.

Merge internal change: 71426216
https://codereview.chromium.org/411723003/

Parameterize the QUIC end-to-end tests to run with FEC both enabled and
disabled.

Found bug that was fixed in internal change: 71390633
(https://codereview.chromium.org/414523003/)

Merge internal change: 71393479
https://codereview.chromium.org/412543005/

Fix a bug in the QuicReceivedPacketManager where a packet which had
previously been revied was not removed from the revived packet set when
it was eventually received out of order.

Merge internal change: 71390633
https://codereview.chromium.org/414523003/

QuicConnection::ProcessValidatedPacket doesn't need to be public because
it is only called by QuicConnection::OnPacketHeader.

Merge internal change: 71371063
https://codereview.chromium.org/402333003/

Add bandwidth_estimate and server_namespace fields to the source-address
token proto. Not used anywhere, this CL is really just for discussion
about which fields (and fieldnames) we should use.

Merge internal change: 71360060
https://codereview.chromium.org/404343003/

R=rch@chromium.org

Review URL: https://codereview.chromium.org/411823002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@287052 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

31 hours agoAttempt to fix UnixDomainServerSocketTest.AcceptWithForbiddenUser
mmenke@chromium.org [Thu, 31 Jul 2014 23:10:58 +0000 (23:10 +0000)]
Attempt to fix UnixDomainServerSocketTest.AcceptWithForbiddenUser
under Valgrind on Mac.

The issue is most likely the assumption the test makes that
running the message loop is enough for a socket message to make it
from the server socket to the client socket.  The fix tries to
read from the client socket instead, and waits for the result.

BUG=397031

Review URL: https://codereview.chromium.org/420823002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286911 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

36 hours agoIgnore cookie where both name and value are empty in SPDY header block
xunjieli@chromium.org [Thu, 31 Jul 2014 18:11:59 +0000 (18:11 +0000)]
Ignore cookie where both name and value are empty in SPDY header block

BUG=392295

Review URL: https://codereview.chromium.org/416243005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286850 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

37 hours agogn win: Don't build quic_server, depends unconditionally on boringssl
scottmg@chromium.org [Thu, 31 Jul 2014 16:52:34 +0000 (16:52 +0000)]
gn win: Don't build quic_server, depends unconditionally on boringssl

R=brettw@chromium.org
TBR=rsleevi@chromium.org
BUG=354261

Review URL: https://codereview.chromium.org/429303002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286823 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

42 hours agoQUIC - enable persisting of QUICServerInfo (server config) to disk
rtenneti@chromium.org [Thu, 31 Jul 2014 12:26:56 +0000 (12:26 +0000)]
QUIC - enable persisting of QUICServerInfo (server config) to disk
cache.

R=jar@chromium.org, rch@chromium.org
BUG=399118

Review URL: https://codereview.chromium.org/428383002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286760 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

42 hours agoImplement QUIC key extraction.
wtc@chromium.org [Thu, 31 Jul 2014 11:36:37 +0000 (11:36 +0000)]
Implement QUIC key extraction.

Added a new subkey_secret output to crypto::HKDF which is
saved by the forward-secure key derivation and used for a new
ExportKeyingMaterial method on QuicCryptoStream. This will be used
in Chromium for WebRTC on QUIC.

Generated some tests by making a straightforward alternative
implementation in Python.

Written by Daniel Ziegler.

Merge internal CL: 72073257

R=agl@chromium.org,dmziegler@chromium.org
BUG=

Review URL: https://codereview.chromium.org/423333002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286738 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoHttp cache: Add support for HEAD requests.
rvargas@chromium.org [Thu, 31 Jul 2014 00:06:46 +0000 (00:06 +0000)]
Http cache: Add support for HEAD requests.

- A HEAD request is not cached by itself.
- A HEAD request is returned from the cache if an entry is there.
- A HEAD request updates the heders of a cached entry (after 304).
- A HEAD request invalidates a cached entry (200 after revalidation).

BUG=350407

Review URL: https://codereview.chromium.org/367973007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286647 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoDisable SPDY and QUIC session pooling.
rch@chromium.org [Wed, 30 Jul 2014 21:25:27 +0000 (21:25 +0000)]
Disable SPDY and QUIC session pooling.

BUG=398925
R=agl@chromium.org

Review URL: https://codereview.chromium.org/417013005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286598 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoStart using L preview API for receiving proxy information.
sgurun@chromium.org [Wed, 30 Jul 2014 20:19:58 +0000 (20:19 +0000)]
Start using L preview API for receiving proxy information.

BUG=398612

Android L preview API added a proxyinfo class for receiving proxy
information. start using it.

Review URL: https://codereview.chromium.org/426063006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286588 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoSwitched calculation of decode/holdback info to avoid confusion if the request
rdsmith@chromium.org [Wed, 30 Jul 2014 14:41:23 +0000 (14:41 +0000)]
Switched calculation of decode/holdback info to avoid confusion if the request
has gone away or the value was cached.

BUG=None
R=jar@chromium.org

Review URL: https://codereview.chromium.org/413563003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286515 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoInitial implementation of Chrome-Freshness header.
ricea@chromium.org [Wed, 30 Jul 2014 11:33:56 +0000 (11:33 +0000)]
Initial implementation of Chrome-Freshness header.

Add a header like

Chrome-Freshness: max-age=30,stale-while-revalidate=60,age=10

when sending a revalidation request to a server which supplied the
Cache-Control stale-while-revalidate directive on the previous response.

Design doc: https://docs.google.com/document/d/1DMCIMAKjyKeYiu69jlI5OsO2pGyAMb81XflYK4hxsNM/edit

BUG=348877
TEST=net_unittests

Review URL: https://codereview.chromium.org/391763002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286482 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoFixes to the SHA256 X509 Certificate fingerprint API.
jww@chromium.org [Wed, 30 Jul 2014 11:24:40 +0000 (11:24 +0000)]
Fixes to the SHA256 X509 Certificate fingerprint API.

In the original commit (285851), I missed several nits that wtc@ later pointed
out. This commit addresses those corrections and suggestions.

BUG=262615

Review URL: https://codereview.chromium.org/421243003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286477 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoImplement JwkSerializer for OpenSSL.
davidben@chromium.org [Wed, 30 Jul 2014 09:18:22 +0000 (09:18 +0000)]
Implement JwkSerializer for OpenSSL.

Update the tests to use a real P-256 public key for the leading zero test.
OpenSSL will refuse to import a public key that's not actually on the curve.
(Actually importing it is somewhat tidier than sniffing at the SPKI and can
handle other point formats.)

This fixes ExternallyConnectableMessagingWithTlsChannelIdTest for the OpenSSL
port.

BUG=398662

Review URL: https://codereview.chromium.org/431453003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286454 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoImplement ALPN for SSLClientSocketOpenSSL.
davidben@chromium.org [Wed, 30 Jul 2014 03:52:15 +0000 (03:52 +0000)]
Implement ALPN for SSLClientSocketOpenSSL.

Also remove server_protos from the SSLClientSocket interface. NSS wasn't
filling it in and NPN is going away eventually. With ALPN, this is less useful.

BUG=388429

Review URL: https://codereview.chromium.org/423623002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286405 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoRevert a change to the condition under which we will verify the proof in
wtc@chromium.org [Wed, 30 Jul 2014 03:41:43 +0000 (03:41 +0000)]
Revert a change to the condition under which we will verify the proof in
STATE_INITIALIZE.

We believe this change (in conjunction with the bug fixed in
https://codereview.chromium.org/422623004/) caused the QUIC performance
regression.

Add comments to explain why the conditions for verifying the proof are
different in STATE_INITIALIZE and STATE_RECV_REJ.

R=jar@chromium.org,rch@chromium.org,rtenneti@chromium.org
BUG=396185

Review URL: https://codereview.chromium.org/424213005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286400 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoRefactor net::MimeUtil media code to return "probably" for codecs the platform likely...
acolwell@chromium.org [Tue, 29 Jul 2014 23:35:55 +0000 (23:35 +0000)]
Refactor net::MimeUtil media code to return "probably" for codecs the platform likely supports.

This patch amends the behaviour set for mp4 mime types
Now browser returns "probably" for codecs which are confirmed to be shipped with Chrome.

CodecPrameter| Before| Now
--------------------------------
avc1.42E0xx -| maybe | probably
avc1.4D40xx -| maybe | probably (non-Android)
avc1.6400xx -| maybe | probably (non-Android)
avc3.xxxxxx -| maybe | probably
mp4a.6B -----| maybe | probably
mp4a.69 -----| maybe | probably
mp4a.67 -----| maybe | probably (non-Android)
mp4a.40.2 ---| maybe | probably
mp4a.40.5 ---| maybe | probably

BUG=388317
TEST=MediaCanPlayTypeTest.*

Review URL: https://codereview.chromium.org/422573005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286333 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoAdd a Clone method to ProofVerifyDetails to allow for the proof verify
rch@chromium.org [Tue, 29 Jul 2014 21:42:13 +0000 (21:42 +0000)]
Add a Clone method to ProofVerifyDetails to allow for the proof verify
details to be copied when initiailizing a CachedState from a canonical
entry.

BUG=398465

Review URL: https://codereview.chromium.org/422623004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286305 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoQUIC - track CHLO's reject reason for secure QUIC vs insecure QUIC.
rtenneti@chromium.org [Tue, 29 Jul 2014 09:43:53 +0000 (09:43 +0000)]
QUIC - track CHLO's reject reason for secure QUIC vs insecure QUIC.

R=rch@chromium.org, asvitkine@chromium.org

Review URL: https://codereview.chromium.org/413363005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286150 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoImplement TLS client auth in the OS X OpenSSL port.
davidben@chromium.org [Tue, 29 Jul 2014 07:51:36 +0000 (07:51 +0000)]
Implement TLS client auth in the OS X OpenSSL port.

This introduces a openssl_platform_key.h that looks up and wraps a platform
private key from the platform key store and returns an EVP_PKEY. It is
implemented on Mac and left as a stub on Windows. This will be refactored with
https://crbug.com/394131.

The USE_OPENSSL_CERTS case has been left intact to preserve the existing tests
on Linux but, possibly after the refactor, this will need to change as Linux and
CrOS will likely still use OpenSSL handles for X509Certificate but will not
likely want the OpenSSLClientKeyStore hack.

BUG=394131

Review URL: https://codereview.chromium.org/396803002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286112 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoMap WebSocket URL schemes to HTTP URL schemes for auth purposes.
ricea@chromium.org [Tue, 29 Jul 2014 07:42:29 +0000 (07:42 +0000)]
Map WebSocket URL schemes to HTTP URL schemes for auth purposes.

This permits WebSocket connections to inherit credentials from HTTP pages, and
matches the behaviour of other browsers.

Design doc: https://docs.google.com/a/chromium.org/document/d/129rLtf5x3hvhP5rayLiSxnEjOXS8Z7EnLJgBL4CdwjI/edit

Also consider any 401 or 407 results that reach the WebSocketStream
URLRequest::Delegate to be unrecoverable errors.

Also ensure that the response headers are reported back to the renderer
when the developer tools are open and a 401 error happens.

BUG=123862

Review URL: https://codereview.chromium.org/336263005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286108 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoMove the test data that's used by net_unittests to net\data to simplify the isolate...
jam@chromium.org [Tue, 29 Jul 2014 04:29:11 +0000 (04:29 +0000)]
Move the test data that's used by net_unittests to net\data to simplify the isolate files.

The background is that url_fetcher was moved from chrome to content to net, but its test data didn't move along.

R=davidben@chromium.org

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286024

Review URL: https://codereview.chromium.org/420313003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286094 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoRevert 286024 "Move the test data that's used by net_unittests t..."
mpearson@chromium.org [Tue, 29 Jul 2014 00:08:14 +0000 (00:08 +0000)]
Revert 286024 "Move the test data that's used by net_unittests t..."

Likely cause of failure on tree:
http://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%281%29/builds/32682

net_unittests net_unittests net_unittests 127 disabled 6 flaky failed 5 ( 4 mins, 19 secs )
stdio
Basic
LargeGet
LargeGetToTempFile
ServerUnavailable
ServerUnavailablePropagateResponse

e.g.,
[ RUN      ] URLFetcherDownloadProgressTest.Basic
HTTP server started on http://127.0.0.1:54345...
sending server_data: {"host": "127.0.0.1", "port": 54345} (36 bytes)
File not found animate1.gif full path:/mnt/data/b/build/slave/Linux_Tests__dbg__1_/build/src/chrome/test/data/animate1.gif
localhost - - [28/Jul/2014 16:51:57] code 404, message Not Found
../../net/url_request/url_fetcher_impl_unittest.cc:601: Failure
Expected: (total) >= (progress), actual: -1 vs 190
../../net/url_request/url_fetcher_impl_unittest.cc:603: Failure
Value of: total
  Actual: -1
Expected: expected_total_
Which is: 19021
../../net/url_request/url_fetcher_impl_unittest.cc:170: Failure
Value of: source->GetResponseCode()
  Actual: 404
Expected: 200
[  FAILED  ] URLFetcherDownloadProgressTest.Basic (205 ms)

> Move the test data that's used by net_unittests to net\data to simplify the isolate files.
>
> The background is that url_fetcher was moved from chrome to content to net, but its test data didn't move along.
>
> R=davidben@chromium.org
>
> Review URL: https://codereview.chromium.org/420313003

TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/422063008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286036 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoMove the test data that's used by net_unittests to net\data to simplify the isolate...
jam@chromium.org [Mon, 28 Jul 2014 23:16:11 +0000 (23:16 +0000)]
Move the test data that's used by net_unittests to net\data to simplify the isolate files.

The background is that url_fetcher was moved from chrome to content to net, but its test data didn't move along.

R=davidben@chromium.org

Review URL: https://codereview.chromium.org/420313003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@286024 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoRemove SPDY_PROXY_AUTH_ORIGIN from net/proxy/proxy_list.cc.
kundaji@chromium.org [Mon, 28 Jul 2014 21:03:26 +0000 (21:03 +0000)]
Remove SPDY_PROXY_AUTH_ORIGIN from net/proxy/proxy_list.cc.

Pass in bypass_duration explicitly when updating proxy bypass duration
instead of generating random duration for data reduction use case.

BUG=396786

Review URL: https://codereview.chromium.org/415743002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285976 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agonet: several HSTS preloaded additions.
agl@chromium.org [Mon, 28 Jul 2014 18:43:37 +0000 (18:43 +0000)]
net: several HSTS preloaded additions.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285954 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agonet: add (*.)domains.google.com to HSTS preloaded.
agl@chromium.org [Mon, 28 Jul 2014 18:09:28 +0000 (18:09 +0000)]
net: add (*.)domains.google.com to HSTS preloaded.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285946 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoIgnore Set-Cookie Directive where both name and value are empty
xunjieli@chromium.org [Mon, 28 Jul 2014 17:17:41 +0000 (17:17 +0000)]
Ignore Set-Cookie Directive where both name and value are empty

BUG=392295

Review URL: https://codereview.chromium.org/405233004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285932 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days ago[WebSocket] Send a close frame when the renderer process is gone.
yhirano@chromium.org [Mon, 28 Jul 2014 10:00:53 +0000 (10:00 +0000)]
[WebSocket] Send a close frame when the renderer process is gone.

Renderer processes may die without clearing its |WebSocketBridge|s.
It is helpful to send a close frame with code = 1001 in such a case.

BUG=392534
R=ricea@chromium.org

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285557

Review URL: https://codereview.chromium.org/390773002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285884 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoExtract ScopedTestNSSDB from nss_util.
pneubeck@chromium.org [Mon, 28 Jul 2014 09:56:51 +0000 (09:56 +0000)]
Extract ScopedTestNSSDB from nss_util.

Before ScopedTestNSSDB affected several slot getters from nss_util.h .
This change reduces ScopedTestNSSDB to solely setup a temporary test DB and not influencing the global state in nss_util anymore.

As a replacement for some of its old behavior, a new ScopedTestSystemNSSKeySlot is added, which allows to override the slot returned by GetSystemNSSKeySlot().

With this change it's now possible to write tests that need both a user and system NSS DB by using ScopedTestSystemNSSKeySlot.

As a side-effect, GetPersistentNSSKeySlot() is now compiled on !OS_CHROMEOS only.

BUG=210525
(For include changes:)

R=rsleevi@chromium.org
TBR=nkostylev@chromium.org, stevenjb@chromium.org

Review URL: https://codereview.chromium.org/401623006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285881 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoAdd SHA-256 fingerprint functions to x509 certs.
jww@chromium.org [Mon, 28 Jul 2014 00:27:59 +0000 (00:27 +0000)]
Add SHA-256 fingerprint functions to x509 certs.

Previously, the x509 cert implementation only had SHA-1 based fingerprinting for
quickly creating indexing appropriate hashes. Since SHA-1 is likely
cryptographically broken, these fingerprints should not be used for any security
decisions. This adds slow SHA-256 fingerprint support for when fingerprints are
needed for security decisions.

R=rsleevi@chromium.org
BUG=262615

Review URL: https://codereview.chromium.org/412263003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285851 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoQUIC - Track the reason for sending InchoateClientHello in UMA
rtenneti@chromium.org [Sat, 26 Jul 2014 18:06:05 +0000 (18:06 +0000)]
QUIC - Track the reason for sending InchoateClientHello in UMA
histogram.

Possible reasons are: no/empty server config, expired server config,
invalid server config and corrupted server config.

R=rch@chromium.org, asvitkine@chromium.org

Review URL: https://codereview.chromium.org/416983005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285765 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoImplement TLS_FALLBACK_SCSV for SSLClientSocketOpenSSL.
davidben@chromium.org [Sat, 26 Jul 2014 18:05:11 +0000 (18:05 +0000)]
Implement TLS_FALLBACK_SCSV for SSLClientSocketOpenSSL.

In doing so, fix a bug in tlslite's TLS_FALLBACK_SCSV support; the fallback
alert should be sent with the client's version. Otherwise OpenSSL reports
SSL_R_UNSUPPORTED_PROTOCOL and doesn't report the alert. This behavior is
probably not wrong as, if the server responds with a TLS version higher than
what is supported, we can't really be sure of the parse.

BUG=388425

Review URL: https://codereview.chromium.org/418553003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285764 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoUpdate masters after the tryserver split.
sergeyberezin@chromium.org [Sat, 26 Jul 2014 04:38:32 +0000 (04:38 +0000)]
Update masters after the tryserver split.

Also replace deprecated linux_chromium_rel with linux_chromium_rel_swarming, while I'm at it.

R=agable@chromium.org, maruel@chromium.org
BUG=395196

Review URL: https://codereview.chromium.org/415323002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285752 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoLog the certificate subjects from the server certificate sent via QUIC.
rch@chromium.org [Fri, 25 Jul 2014 23:42:10 +0000 (23:42 +0000)]
Log the certificate subjects from the server certificate sent via QUIC.

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285446

Review URL: https://codereview.chromium.org/418723002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285721 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoParseHosts: Allow commas as separators on Mac OS X
ttuttle@chromium.org [Fri, 25 Jul 2014 23:03:20 +0000 (23:03 +0000)]
ParseHosts: Allow commas as separators on Mac OS X

Apparently, OS X allows commas as separators between hostnames in the hosts
file. Treat commas the same as whitespace to support this. (Hostnames and IP
addresses will never contain commas, so this shouldn't break anything.)

BUG=396309

Review URL: https://codereview.chromium.org/415153002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285718 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRevert of [WebSocket] Send a close frame when the renderer process is gone. (https...
kaznacheev@chromium.org [Fri, 25 Jul 2014 11:57:13 +0000 (11:57 +0000)]
Revert of [WebSocket] Send a close frame when the renderer process is gone. (https://codereview.chromium.org/390773002/)

Reason for revert:
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%282%29/builds/5350

Original issue's description:
> [WebSocket] Send a close frame when the renderer process is gone.
>
> Renderer processes may die without clearing its |WebSocketBridge|s.
> It is helpful to send a close frame with code = 1001 in such a case.
>
> BUG=392534
> R=ricea@chromium.org
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285557

TBR=ricea@chromium.org,jgraettinger@chromium.org,eroman@chromium.org,mmenke@chromium.org,yhirano@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=392534

Review URL: https://codereview.chromium.org/416333004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285564 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days ago[WebSocket] Send a close frame when the renderer process is gone.
yhirano@chromium.org [Fri, 25 Jul 2014 10:32:48 +0000 (10:32 +0000)]
[WebSocket] Send a close frame when the renderer process is gone.

Renderer processes may die without clearing its |WebSocketBridge|s.
It is helpful to send a close frame with code = 1001 in such a case.

BUG=392534
R=ricea@chromium.org

Review URL: https://codereview.chromium.org/390773002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285557 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRemove the deprecated NSSCertDatabase::GetInstance() .
pneubeck@chromium.org [Fri, 25 Jul 2014 10:09:52 +0000 (10:09 +0000)]
Remove the deprecated NSSCertDatabase::GetInstance() .

The NSSCertDatabase singleton for Linux is now maintained by nss_context_linux.cc .

BUG=329735

Review URL: https://codereview.chromium.org/405973003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285551 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRevert of Reenable UpdateDynamicPKPMaxAge0 test. (https://codereview.chromium.org...
jam@chromium.org [Fri, 25 Jul 2014 06:38:57 +0000 (06:38 +0000)]
Revert of Reenable UpdateDynamicPKPMaxAge0 test. (https://codereview.chromium.org/293253002/)

Reason for revert:
this is still flaking. more info in bug

TBR=palmer
NOTRY=true

Original issue's description:
> Reenable UpdateDynamicPKPMaxAge0 test.
>
> BUG=375538
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281863

Review URL: https://codereview.chromium.org/412353006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285508 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoMake Pepper WebSocket UtilityGetProtocol test less flaky by making the wsh wait for...
tyoshino@chromium.org [Fri, 25 Jul 2014 06:05:27 +0000 (06:05 +0000)]
Make Pepper WebSocket UtilityGetProtocol test less flaky by making the wsh wait for close

Attempt to fix the flakiness by making sure the server handler doesn't exit
before the client closes.

BUG=389084
R=jgraettinger,yhirano

Review URL: https://codereview.chromium.org/410383003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285500 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoSwitch to using SSL_get0_certificate_types for client auth.
davidben@chromium.org [Fri, 25 Jul 2014 06:03:08 +0000 (06:03 +0000)]
Switch to using SSL_get0_certificate_types for client auth.

Upstream added SSL_get0_certificate_types while we added
SSL_get_client_certificate_types in parallel. Switch to upstream's API.

BUG=388000

Review URL: https://codereview.chromium.org/415853002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285498 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoUpdate net/data/websocket/close-code-and-reason_wsh.py
tyoshino@chromium.org [Fri, 25 Jul 2014 05:56:16 +0000 (05:56 +0000)]
Update net/data/websocket/close-code-and-reason_wsh.py

Sync with one in the LayoutTests directory to include the code to
wait for a close frame from the client.

BUG=396399
R=jgraettinger,ricea

Review URL: https://codereview.chromium.org/415953003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285497 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRemove Create*Value (except CreateNullValue)
estade@chromium.org [Fri, 25 Jul 2014 05:55:36 +0000 (05:55 +0000)]
Remove Create*Value (except CreateNullValue)

BUG=160586

Review URL: https://codereview.chromium.org/415423002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285496 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRevert 285446 "Log the certificate subjects from the server cert..."
hajimehoshi@chromium.org [Fri, 25 Jul 2014 05:21:16 +0000 (05:21 +0000)]
Revert 285446 "Log the certificate subjects from the server cert..."

Tests failed on XP: http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/32148

> Log the certificate subjects from the server certificate sent via QUIC.
>
> Review URL: https://codereview.chromium.org/418723002

TBR=rch@chromium.org

Review URL: https://codereview.chromium.org/415333005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285480 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoMake the default alternate protcol probability threshold 1, not 0.
rch@chromium.org [Fri, 25 Jul 2014 03:56:54 +0000 (03:56 +0000)]
Make the default alternate protcol probability threshold 1, not 0.
This means that by default, Chrome will honor headers like:
  Alternate-Protocol: 80:quic
  Alternate-Protocol: 80:quic,p=1
But not:
  Alternate-Protocol: 80:quic,p=.5
Eventually we need to switch to a dynamic threshold, but on step at a time.

Review URL: https://codereview.chromium.org/411423003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285473 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoLog the certificate subjects from the server certificate sent via QUIC.
rch@chromium.org [Fri, 25 Jul 2014 01:16:49 +0000 (01:16 +0000)]
Log the certificate subjects from the server certificate sent via QUIC.

Review URL: https://codereview.chromium.org/418723002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285446 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRemove LOG(INFO)'s from spdy_network_transaction_unittest.cc - Revert r244946
rch@chromium.org [Fri, 25 Jul 2014 01:07:02 +0000 (01:07 +0000)]
Remove LOG(INFO)'s from spdy_network_transaction_unittest.cc - Revert r244946

BUG=395354

Review URL: https://codereview.chromium.org/416153002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285444 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRename ServerBoundCert => ChannelID to reflect the current name
rch@chromium.org [Fri, 25 Jul 2014 00:25:35 +0000 (00:25 +0000)]
Rename ServerBoundCert => ChannelID to reflect the current name
of this feature.

TBR=darin

Review URL: https://codereview.chromium.org/356713005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285432 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoExplain the three values written by WriteSecBuf, in particular, why the
wtc@chromium.org [Thu, 24 Jul 2014 23:38:26 +0000 (23:38 +0000)]
Explain the three values written by WriteSecBuf, in particular, why the
first two values are the same.

R=rsleevi@chromium.org, glider@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/418533002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285407 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agonet: add a couple of sites to HSTS preloaded.
agl@chromium.org [Thu, 24 Jul 2014 21:02:48 +0000 (21:02 +0000)]
net: add a couple of sites to HSTS preloaded.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285368 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoFix copy-pasto in MockSSPILibrary::QuerySecurityPackageInfo and MockSSPILibrary:...
glider@chromium.org [Thu, 24 Jul 2014 11:21:44 +0000 (11:21 +0000)]
Fix copy-pasto in MockSSPILibrary::QuerySecurityPackageInfo and MockSSPILibrary::DeleteSecurityContext

BUG=NONE
R=cbentzel@chromium.org

Review URL: https://codereview.chromium.org/414443011

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285191 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoFix WebSocket race between close and connect.
ricea@chromium.org [Thu, 24 Jul 2014 10:48:16 +0000 (10:48 +0000)]
Fix WebSocket race between close and connect.

If the WebSocket handshake was cancelled immediately after the connect
succeeded before the ClientSocketHandle was fully initialised, then the
socket would not be released back to the pool, and as a result the
endpoint would not be unlocked.

Fix by actively reclaiming the socket in
WebSocketTransportClientSocketPool::CancelRequest().

Also add a test for this condition.

BUG=394268, 389084
TEST=net_unittests

Review URL: https://codereview.chromium.org/394113003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285175 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agoRefactor unix domain socket.
byungchul@chromium.org [Thu, 24 Jul 2014 03:51:23 +0000 (03:51 +0000)]
Refactor unix domain socket.

This is a pre-requisite for http server refactoring,
https://codereview.chromium.org/296053012/.

1) Define UnixDomainClientSocket and UnixDomainServerSocket utilizing
   SocketLibevent.
2) Rename UnixDomainSocket to UnixDomainListenSocket to reduce confusion.
3) unittests

BUG=371906

Review URL: https://codereview.chromium.org/376323002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285148 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agoRemove now unnecessary const_casts.
davidben@chromium.org [Thu, 24 Jul 2014 03:01:11 +0000 (03:01 +0000)]
Remove now unnecessary const_casts.

BoringSSL fixes this API to be const-correct.

BUG=none

Review URL: https://codereview.chromium.org/417683003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285134 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agoclang/win: Fix most -Wwriteable-strings warnings.
thakis@chromium.org [Wed, 23 Jul 2014 22:04:53 +0000 (22:04 +0000)]
clang/win: Fix most -Wwriteable-strings warnings.

Many win32 APIs take non-const string pointers. I checked that MSDN documents
them as _In_ and says that they are inputs, and then added const_cast<>s at
the calling sites. (In one test, I introduced a helper struct so that there
can be fewer casts.)

This wasn't just busywork, I found one function that we were handing string
literals where the documentation explicitly said that that's not valid
(filed http://crbug.com/396705).

I didn't change the DECLARE_REGISTRY_APPID_RESOURCEID() call in cloud_print;
it sounds like that'll fix itself when we update to the 2014 sdk:
http://connect.microsoft.com/VisualStudio/feedback/details/806376/atl-hindrances-to-adopting-new-strictstrings-conformance-option-in-vs2013

BUG=396705,82385
R=rnk@chromium.org, rsleevi@chromium.org, sergeyu@chromium.org, vitalybuka@chromium.org

Review URL: https://codereview.chromium.org/413763003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285051 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agoDisable all the tests that are flaking more than 5% on Windows builders.
jam@chromium.org [Wed, 23 Jul 2014 17:20:15 +0000 (17:20 +0000)]
Disable all the tests that are flaking more than 5% on Windows builders.

Data from http://chromium-build-logs.appspot.com/flakiness_dashboard?master=chromium.win.

BUG=386891,387124,396373,396384,396386,396387,396388,396390,396392,387124,396393,396395,396399,396402,396403,396404,396405,393149,396409,95557,396413,396414,375894
R=viettrungluu@chromium.org
TBR=brettw, rvargas, sky

Review URL: https://codereview.chromium.org/410843003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284977 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agoEncode all grit outputs in .gn files
brettw@chromium.org [Wed, 23 Jul 2014 16:32:32 +0000 (16:32 +0000)]
Encode all grit outputs in .gn files

This finishes the rest of the Grit outputs that was started in a previous pass, and removes the ability to optionally deduce outputs at GN-time (which is slow so we don't want to do it).

R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/411543005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284947 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoRename WorkSource to CallbackSource.
wtc@chromium.org [Wed, 23 Jul 2014 01:50:04 +0000 (01:50 +0000)]
Rename WorkSource to CallbackSource.

Accordingly, the DoPendingWork method is renamed RunPendingCallbacks,
the work_source parameter is renamed callback_source, and the
CommunicateHandshakeMessagesAndDoWork function is renamed
CommunicateHandshakeMessagesAndRunCallbacks.

Change CryptoTestUtils::HandshakeWithFakeClient to verify that
the ChannelIDSource operate asynchronously if the
channel_id_source_async option is true.

R=rch@chromium.org,rtenneti@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/405293003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284831 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoQUIC - undo the chromium specific changes from the following CL which
rtenneti@chromium.org [Wed, 23 Jul 2014 01:40:40 +0000 (01:40 +0000)]
QUIC - undo the chromium specific changes from the following CL which
did "Moving work from the QuicSession constructor to
InitializeSession()".

  https://codereview.chromium.org/393953009/
  Merge internal change: 70661792

This CL fixes the crash bug in
net::QuicSession::IsCryptoHandshakeConfirmed. We are accessing
crypto_stream_ before it was created. This could be triggered if the
computer is slow or goes to sleep and crypto handshake not completed
timer goes off.

BUG=395790
R=rch@chromium.org

Review URL: https://codereview.chromium.org/407193002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284827 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoDisable two recent Channel ID-related CLs to investigate a secure QUIC performance...
wtc@chromium.org [Tue, 22 Jul 2014 23:37:12 +0000 (23:37 +0000)]
Disable two recent Channel ID-related CLs to investigate a secure QUIC performance degradation.

The change to quic_stream_factory.cc disables
https://codereview.chromium.org/346323002/

The change to quic_crypto_client_stream.cc disables
https://codereview.chromium.org/355293003/

R=rch@chromium.org
BUG=396185

Review URL: https://codereview.chromium.org/414523004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284806 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoSwitch to BoringSSL.
davidben@chromium.org [Tue, 22 Jul 2014 18:20:37 +0000 (18:20 +0000)]
Switch to BoringSSL.

This is a reland of r284079 which was reverted in r284248 for components build
issues. That, in turn, was a reland of r283813 which was reverted in r283845
because it broke WebRTC tests on Android. That, in turn, was a reland of
r283542 which was reverted in r283591 because it broke the WebView build.

This is a much larger change than its diff suggests. If it breaks
something, please revert first and ask questions later.

BUG=393317
R=agl@chromium.org, jam@chromium.org

Review URL: https://codereview.chromium.org/401153002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284729 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoDifferent SPDY Hpack constant table for startup time and footprint (60KB).
bratell@opera.com [Tue, 22 Jul 2014 16:21:48 +0000 (16:21 +0000)]
Different SPDY Hpack constant table for startup time and footprint (60KB).

The hpack constant table was 40-60 KB (gcc: 40 KB, clang: 60KB), for
storing 2 KB of data. Not optimal.

By making it an ordinary static data table we save 60 KB with clang:

Total change: -64153 bytes
==========================
  1 added, totalling +2056 bytes across 1 sources
  1 removed, totalling -66215 bytes across 1 sources
  1 grown, for a net change of +14 bytes (367 bytes before, 381 bytes after) across 1 sources
  1 shrunk, for a net change of -8 bytes (10504 bytes before, 10496 bytes after) across 1 sources

and save 40 KB with gcc:

Total change: -41382 bytes
==========================
  1 added, totalling +2056 bytes across 1 sources
  2 removed, totalling -43597 bytes across 2 sources
  1 grown, for a net change of +167 bytes (341 bytes before, 508 bytes after) across 1 sources
  1 shrunk, for a net change of -8 bytes (10576 bytes before, 10568 bytes after) across 1 sources

BUG=394269

Review URL: https://codereview.chromium.org/393573002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284698 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoEnforce SafetyMode for YouTube if prefs::kForceSafeSearch is on, by modifying (or...
treib@chromium.org [Tue, 22 Jul 2014 16:03:24 +0000 (16:03 +0000)]
Enforce SafetyMode for YouTube if prefs::kForceSafeSearch is on, by modifying (or adding) YouTube's PrefCookie in the HTTP header.

This is essentially a followup to https://codereview.chromium.org/11186002/

Note: This is a fixed reland of crrev.com/282546 / https://codereview.chromium.org/354183002/ which was reverted due to a bug in ParseRequestCookieLine.

TBRing since it has already been reviewed in the first try.

TBR=erikwright@chromium.org

BUG=344815

Review URL: https://codereview.chromium.org/388823002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284687 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoAdd AssertNoURLRequests() to URLRequestContext subclass destructors.
jgraettinger@chromium.org [Tue, 22 Jul 2014 00:27:40 +0000 (00:27 +0000)]
Add AssertNoURLRequests() to URLRequestContext subclass destructors.

BUG=377852

Review URL: https://codereview.chromium.org/379293002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284556 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoSet tls_client_cert_optional in net/.../testserver.py.
pneubeck@chromium.org [Mon, 21 Jul 2014 15:22:41 +0000 (15:22 +0000)]
Set tls_client_cert_optional in net/.../testserver.py.

Before this value wasn't set at all leading to crashes of the test server if tsls_client_auth was enabled.

BUG=NONE
TBR=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/407653005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284431 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agonet: fix comment typo and format in HSTS preloaded.
agl@chromium.org [Mon, 21 Jul 2014 13:54:39 +0000 (13:54 +0000)]
net: fix comment typo and format in HSTS preloaded.

(No semantic change.)

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284422 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRevert "Switch to BoringSSL."
agl@chromium.org [Fri, 18 Jul 2014 23:18:18 +0000 (23:18 +0000)]
Revert "Switch to BoringSSL."

This reverts commit r284079.

BUG=395271

Review URL: https://codereview.chromium.org/406693004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284248 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoLand Recent QUIC Changes.
rtenneti@chromium.org [Fri, 18 Jul 2014 21:35:24 +0000 (21:35 +0000)]
Land Recent QUIC Changes.

Cleanup and adding GetCongestionControlType.

Merge internal change: 71125139
https://codereview.chromium.org/400813002/

QUIC test only change to add track the observed loss rate in
SendAlgorithmSimulator.

Merge internal change: 71116533
https://codereview.chromium.org/399763004/

Minor formatting changes to keep the code similar to internal tree.

Merge internal change: 71059110
https://codereview.chromium.org/393283005/

Add more testing to QUIC's BbrTcpSender to verify it shares bandwidth
fairly with itself.

Also includes fixes to SendAlgorithmSimulator.

Merge internal change: 71000950
https://codereview.chromium.org/399793002/

Will merge BbrTcpSender changes in a future CL after the approvals.

Add a DLOG that indicates the peer sent us a QUIC_PUBLIC_RESET. Makes it
more obvious why the connection ended when running the quic_client.

Merge internal change: 70900278
https://codereview.chromium.org/399793002/

QUIC test only change to add a convenience operator for printing
SendAlgorithmSimulator stats.

Merge internal change: 70897829
https://codereview.chromium.org/399773003/

Adds dynamic setting of FEC group size based on the connection's current
congestion window.

There will be two triggers for transmitted an FEC packet, when
protection is required -- max_packets_per_fec_group, and an FEC alarm
that triggers an FEC packet if the FEC group has been open for long
enough. This CL implements dynamically setting
max_packets_per_fec_group. The FEC alarm will be written in a
subsequent CL.

Merge internal change: 70821636
https://codereview.chromium.org/398873003/

R=rch@chromium.org

Review URL: https://codereview.chromium.org/399153003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284205 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoQUIC - minor cleanup changes.
rtenneti@chromium.org [Fri, 18 Jul 2014 16:06:23 +0000 (16:06 +0000)]
QUIC - minor cleanup changes.
  + Fixed indentation.
  + Added early returns.
  + Fixed comments.
  + Removed not needed virtual.

Fixed nit comments from wtc for the following CLs.

  https://codereview.chromium.org/368803003/
  https://codereview.chromium.org/366863002/
  https://codereview.chromium.org/393953011/

R=wtc@chromium.org

Review URL: https://codereview.chromium.org/394053003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284109 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoSwitch to BoringSSL.
agl@chromium.org [Fri, 18 Jul 2014 13:51:03 +0000 (13:51 +0000)]
Switch to BoringSSL.

(This is a reland of r283813 which was reverted in r283845 because it broke
WebRTC tests on Android. That, in turn, was a reland of of r283542 which was
reverted in r283591 because it broke the WebView build.)

This is a much larger change than its diff suggests. If it breaks
something, please revert first and ask questions later.

BUG=none

Review URL: https://codereview.chromium.org/401613008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284079 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRemove NSSCertDatabase from ClientCertStoreChromeOS unittest.
pneubeck@chromium.org [Fri, 18 Jul 2014 10:57:07 +0000 (10:57 +0000)]
Remove NSSCertDatabase from ClientCertStoreChromeOS unittest.

The database was only used to import a PKCS#12 file. By changing to separate key (PKCS#8 format) and cert (X509 in PEM encoding), only dependencies on the lower level RSAPrivateKey, X509Certificate and PK11_* NSS functions are required.
Note this removes at the same time a call to the deprecated NSSCertDatabase::GetInstance().

Also
- fixes multi profile cases of the unit test and the CA matching (the latter is now identical to all other platforms).
- fixes a bug in the matching of client certs from software slots, because of reused cert database names
- gets rid of the error output that occurred during the PKCS12 import because the file contained also a CA cert:
  [ERROR:nsPKCS12Blob.cpp(219)] Could not grab a handle to the certificate in the slot from the corresponding PKCS#12 DER certificate.

BUG=210525, 329735,315285

Review URL: https://codereview.chromium.org/394013005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284056 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoLand Recent QUIC Changes.
rtenneti@chromium.org [Fri, 18 Jul 2014 09:27:50 +0000 (09:27 +0000)]
Land Recent QUIC Changes.

Correct comment, and change ptr argument to const ref in
CacheNewServerConfig.

Merge internal change: 70794754
https://codereview.chromium.org/398643003/

Allow QUIC clients to accept STK/SCFG updates on an existing connection.

Merge internal change: 70794017
https://codereview.chromium.org/393953011/

To be used in internal change: 70123647 when processing a mid-connection
update of SCFG/STK.

QUIC: Factor out updating cached server config into a new method.

Merge internal change: 70736560
https://codereview.chromium.org/398623003/

Adding logging to quic for tracegraf

This should not change behavior. set_logging_visitor is only used in a
test and will be done in a followup CL.

Adding logging to quic in a protobuf that will be used by tracegraf (not
yet used in production).

Merge internal change: 70735705
https://codereview.chromium.org/398683002/

Reduce the scope of a spurious WARNING log when processing strike
register errors to something that truly shouldn't happen.  Also change
log level to DFATAL.

Merge internal change: 70716413
https://codereview.chromium.org/391283003/

Enable Kathleen Nichols min rtt algorithm with a 1 minute window in
QUIC's BBRTcpSender.

Merge internal change: 70683520
https://codereview.chromium.org/394023005/

Moving the work currently done in the QuicSession constructor to
Initialize().

This is worthwhile because currently it's possible for virtual functions
to be called from under the stack of the QuicSession constructor, which
is confusing and annoying to debug.  Example: if a bad config (without
SetDefaults called) is passed to the quic server session, it calls
SetFromConfig which calls SetIdleNetworkTimeout which calls
CheckForTimeout which can technically call SendConnectionClose which
calls CloseConnection which calls visitor->OnConnectionClosed() on the
session, which still doesn't have a good vtable.

As it turns out, this puts the internal server in an inconsistent state
which causes all sorts of other annoying to debug things.  This can be
solved by never giving an invalid config (heh) or, say, not doing a ton
of complicated work in a constructor in the first place.

This hopefully will also make some unit testing earlier as you don't
have to do quite as much work in test classes.

Moving work from the QuicSession constructor to InitializeSession()

Merge internal change: 70661792
https://codereview.chromium.org/393953009/

Change QUIC's pacing sender to send at 1.25x the estimated bandwidth
during congestion avoidance, instead of 2x.

Merge internal change: 70658053
https://codereview.chromium.org/393943004/

Populate FasterExtraStats for QUIC requests
if --faster_stats_extra_logging != 0

Merge internal change: 70419510
https://codereview.chromium.org/396533003/

Fix a newly introduced bug in QUIC's PacingSender where burst_tokens_
would never be set back to 10 after the initialization, because
OnCongestionEvent is never called with bytes_in_flight of 0.

Merge internal change: 70371419
https://codereview.chromium.org/397513002/

R=rch@chromium.org

Review URL: https://codereview.chromium.org/391383002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284041 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFix canPlayType() support for non-RFC compliant mp3 mimetype.
acolwell@chromium.org [Thu, 17 Jul 2014 23:49:47 +0000 (23:49 +0000)]
Fix canPlayType() support for non-RFC compliant mp3 mimetype.

The 'audio/mpeg; codecs="mp3"' mimetype is not RFC 3003 compliant, but a
bunch of sites apparently use it. This change restores the behavior that
was in M35 and earlier and returns "probably" for this mimetype.

The changes are intentionally kept small so they can be easily be merged
to the M36 & M37 branches.

BUG=393720,386073
TEST=MediaCanPlayTypeTest.CodecSupportTest_mp3

Review URL: https://codereview.chromium.org/400023002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283929 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRevert 283813 "Switch to BoringSSL."
vitalybuka@chromium.org [Thu, 17 Jul 2014 20:07:06 +0000 (20:07 +0000)]
Revert 283813 "Switch to BoringSSL."
Failed WebRtcBrowserTest on android_dbg_triggered_tests.

> Switch to BoringSSL.
>
> (This is a reland of r283542 which was reverted in r283591 because it
> broke the WebView build. The android_aosp trybots are broken[1] so this
> based on hope.)
>
> This is a much larger change than its diff suggests. If it breaks
> something, please revert first and ask questions later.
>
> [1] http://code.google.com/p/chromium/issues/detail?id=394597
>
> BUG=none
>
> Review URL: https://codereview.chromium.org/399993002

TBR=agl@chromium.org

Review URL: https://codereview.chromium.org/405503002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283845 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoQUIC - Record reject reasons for CHLO message.
rtenneti@chromium.org [Thu, 17 Jul 2014 18:06:57 +0000 (18:06 +0000)]
QUIC - Record reject reasons for CHLO message.

Added "Net.QuicClientHelloRejectReasons" histogram to track
the reject reason in UMA. Currently it tracks only reject
reason.

Once we have more data, will add the multiple reject reasons
to histograms.xml (instead of listing all potential
combinations). We are guessing, that we would have few
failures due to multiple errors.

R=jar@chromium.org, rch@chromium.org, asvitkine@chromium.org, wtc@chromium.org

Review URL: https://codereview.chromium.org/342863005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283816 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoSwitch to BoringSSL.
agl@chromium.org [Thu, 17 Jul 2014 17:59:10 +0000 (17:59 +0000)]
Switch to BoringSSL.

(This is a reland of r283542 which was reverted in r283591 because it
broke the WebView build. The android_aosp trybots are broken[1] so this
based on hope.)

This is a much larger change than its diff suggests. If it breaks
something, please revert first and ask questions later.

[1] http://code.google.com/p/chromium/issues/detail?id=394597

BUG=none

Review URL: https://codereview.chromium.org/399993002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283813 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoUpload pk8 key files for ClientCertStoreChromeOS unittest.
pneubeck@chromium.org [Thu, 17 Jul 2014 13:21:49 +0000 (13:21 +0000)]
Upload pk8 key files for ClientCertStoreChromeOS unittest.

This uploads key files before changing the unit test, as the Commit-Queue has problems with binary files.

Main CL will be committed afterwards: https://codereview.chromium.org/394013005/

BUG=210525, 329735, 315285
TBR=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/399103002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283765 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoReject reasons from strike register when nonce validation fails.
rtenneti@chromium.org [Thu, 17 Jul 2014 07:34:19 +0000 (07:34 +0000)]
Reject reasons from strike register when nonce validation fails.

Send reject reason to client for debugging purposes.

Merge internal change: 70366491

R=wtc@chromium.org

Review URL: https://codereview.chromium.org/388333005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283692 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRemove base/network_change_notifier_linux_unittest.cc exclusion.
mukai@chromium.org [Thu, 17 Jul 2014 06:16:50 +0000 (06:16 +0000)]
Remove base/network_change_notifier_linux_unittest.cc exclusion.

It seems this file doesn't exist anymore, so the exclusion
rules aren't also necessary. And GN reports error for
excluding non-existing files.

BUG=None
R=brettw@chromium.org, szym@chromium.org
TEST=None

Review URL: https://codereview.chromium.org/399723002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283655 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFix a few stray net::'s in net/socket/
davidben@chromium.org [Thu, 17 Jul 2014 04:27:04 +0000 (04:27 +0000)]
Fix a few stray net::'s in net/socket/

BUG=none

Review URL: https://codereview.chromium.org/395303003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283642 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRemove default key slot from KeygenHandler.
pneubeck@chromium.org [Thu, 17 Jul 2014 04:05:12 +0000 (04:05 +0000)]
Remove default key slot from KeygenHandler.

KeygenHandler defaulted to use the persistent key slot. However, the Handler is also used in ChromeOS where no such global persistent slot exists.

This change removes this default behavior from KeygenHandler.
Instead only the slot provided by the CryptoModuleDelegate will be used.
If no CryptoModuleDelegate is set, then an error will be thrown on keygen usage.

The unit test of KeygenHandler now explicitly provides the slot through a StubCryptoModuleDelegate.
In a follow up, the crypto::GetPersistentNSSKeySlot() call will be removed from the unit tests as well and instead the test slot will be get()'ed from the ScopedTestNSSDB.

BUG=210525

Review URL: https://codereview.chromium.org/384413004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283634 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRevert "Switch to BoringSSL."
agl@chromium.org [Thu, 17 Jul 2014 00:20:36 +0000 (00:20 +0000)]
Revert "Switch to BoringSSL."

This reverts commit 283542.

This broke the WebView Android build.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283591 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoReimplement QuicCryptoClientStream::WasChannelIDSent with a boolean
wtc@chromium.org [Wed, 16 Jul 2014 23:17:47 +0000 (23:17 +0000)]
Reimplement QuicCryptoClientStream::WasChannelIDSent with a boolean
member so we can free channel_id_key_ after we're finished with it.

This fixes a TODO in https://codereview.chromium.org/355293003/.

R=rch@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/397803004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283569 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoSwitch to BoringSSL.
agl@chromium.org [Wed, 16 Jul 2014 22:15:31 +0000 (22:15 +0000)]
Switch to BoringSSL.

(This is a much larger change than its diff suggests. If it breaks something, please revert first and ask questions later.)

R=davidben@chromium.org, eroman@chromium.org, rsleevi@chromium.org

Review URL: https://codereview.chromium.org/345063006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283542 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoReplace setsockopt(IP_PKTINFO) and setsockopt(IPV6_RECVPKTINFO) calls by
wtc@chromium.org [Wed, 16 Jul 2014 20:23:12 +0000 (20:23 +0000)]
Replace setsockopt(IP_PKTINFO) and setsockopt(IPV6_RECVPKTINFO) calls by
gfe_quic::QuicSocketUtils::SetGetAddressInfo() calls. Update
gfe_quic::QuicSocketUtils::SetGetAddressInfo() to the best-known
implementation.

Merge internal CL: 70966702

R=rtenneti@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/397793004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283482 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRemove an unused local variable in quic_in_memory_cache.cc, only used
wtc@chromium.org [Wed, 16 Jul 2014 19:05:58 +0000 (19:05 +0000)]
Remove an unused local variable in quic_in_memory_cache.cc, only used
for testing.

Merge internal CL: 71210916

R=rtenneti@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/393143002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283464 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFix buffer reuse bug in SSLServerSocket tests.
davidben@chromium.org [Wed, 16 Jul 2014 18:40:43 +0000 (18:40 +0000)]
Fix buffer reuse bug in SSLServerSocket tests.

Write would return synchronously but continue to retain the buffer.

BUG=380340,381147

Review URL: https://codereview.chromium.org/396003002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283454 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoNarrow the strike register window in both directions when tracking many
rtenneti@chromium.org [Wed, 16 Jul 2014 18:29:50 +0000 (18:29 +0000)]
Narrow the strike register window in both directions when tracking many
recent nonces.  This reduces the amount of time that nonces with future
timestamps are tracked, which allows accepting more nonces from clients
with clocks that agree with the strike register's clock.

Not flag protected.

Merge internal change: 69497947

R=wtc@chromium.org

Review URL: https://codereview.chromium.org/389393005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283445 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFix TestChannelIDKey ASan failure under OpenSSL.
davidben@chromium.org [Wed, 16 Jul 2014 05:30:43 +0000 (05:30 +0000)]
Fix TestChannelIDKey ASan failure under OpenSSL.

EVP_MD_CTX has two sets of cleanup functions, depending on whether it's heap-
or stack-allocated.

BUG=393962

Review URL: https://codereview.chromium.org/395933003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283358 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agofix narrowing conversion warning in SpdyFramerTest.CreatePriority
mostynb@opera.com [Wed, 16 Jul 2014 05:15:45 +0000 (05:15 +0000)]
fix narrowing conversion warning in SpdyFramerTest.CreatePriority

Avoid narrowing conversion warnings by not trying to put
a char in an unsigned char array.

BUG=345769

Review URL: https://codereview.chromium.org/392883002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283352 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks ago[Android][gn] Add android resources templates
cjhopman@chromium.org [Wed, 16 Jul 2014 00:11:03 +0000 (00:11 +0000)]
[Android][gn] Add android resources templates

This adds support for android resources to gn.

Two new templates are introduced:

java_string_grd: This is like gyp's build/java_strings_grd.gypi. It runs
grit and generates Android strings.xml files and then zips them
together.
android_resources: This is the target for android resources. It is
mostly a wrapper around process_resources.py. This is *not part* of
android_library (like it is in gyp). Making these two things separate is
more like facebook's BUCK and google's internal build rules (and gyp's
java.gypi and java_apk.gypi have gotten way too big and complicated).

Changes to the actual build scripts are very minor except for the added
support for andoid_resources to write_build_config.py. Building
resources requires getting all the transitive resource dependencies, and
so this reuses the simple sorted transitive dependency thing from
write_ordered_libraries.py.

TBR=rch@chromium.org
BUG=359249

Review URL: https://codereview.chromium.org/361633002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283293 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFix strike register horizon computation.
rtenneti@chromium.org [Tue, 15 Jul 2014 19:11:40 +0000 (19:11 +0000)]
Fix strike register horizon computation.

Merge internal change: 69311275

R=wtc@chromium.org

Review URL: https://codereview.chromium.org/396473002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283228 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoPreserve transport errors for OpenSSL sockets.
davidben@chromium.org [Mon, 14 Jul 2014 20:43:41 +0000 (20:43 +0000)]
Preserve transport errors for OpenSSL sockets.

This makes the OpenSSL BIO pair behave like nss_memio with respect to errors,
eliminating many discrepancies between the two backends in
ssl_client_socket_unittest.cc. (While adding one as it exposes a difference in
how OpenSSL and NSS behave internally.) This also makes our fallback behavior
on TCP reset match; in NSS we take care to only fall back to TLS 1, but our
OpenSSL code falls back all the way to SSL3.

We save transport errors and install a BIO callback to return those errors
through the OpenSSL error queue when OpenSSL's SSL implementation attempts to
read or write to the transport BIO.

BUG=372849, 341178

Review URL: https://codereview.chromium.org/367963007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283013 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agonet: a couple of domains for HSTS preloading.
agl@chromium.org [Mon, 14 Jul 2014 18:11:28 +0000 (18:11 +0000)]
net: a couple of domains for HSTS preloading.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282977 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoAdd support for clearing the HTTP auth cache.
christiank@opera.com [Mon, 14 Jul 2014 14:23:45 +0000 (14:23 +0000)]
Add support for clearing the HTTP auth cache.

This patch adds an API so that the platform can clear the HTTP auth cache
at will. This can be useful when clearing private browsing data to prevent
cached credentials from being re-used.

BUG=63723

Review URL: https://codereview.chromium.org/351833002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282944 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoReland "Separate client and server pushed streams limits."
baranovich@yandex-team.ru [Mon, 14 Jul 2014 02:21:55 +0000 (02:21 +0000)]
Reland "Separate client and server pushed streams limits."

https://codereview.chromium.org/367963003/

Fix use-after-free error

BUG=170544, 377538
R=jgraettinger@chromium.org

TEST=SpdySessionTest.PushedStreamShouldNotCountToClientConcurrencyLimit
SpdySessionTest.RejectPushedStreamExceedingConcurrencyLimit
SpdySessionTest.IgnoreReservedRemoteStreamsCount

Review URL: https://codereview.chromium.org/371273003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282889 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoAdd GetSystemNSSKeySlot, merge GetPrivateNSSKeySlot/GetPublicNSSKeySlot to GetPersist...
mattm@chromium.org [Sun, 13 Jul 2014 07:19:00 +0000 (07:19 +0000)]
Add GetSystemNSSKeySlot, merge GetPrivateNSSKeySlot/GetPublicNSSKeySlot to GetPersistentNSSKeySlot.

GetSystemNSSKeySlot returns the ChromeOS system-wide TPM slot.

ChromeOS has separate slots for each user and linux doesn't have a public/private split, so GetPrivateNSSKeySlot no longer makes sense.

BUG=210525
TBR=stevenjb@chromium.org

Review URL: https://codereview.chromium.org/383593002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282862 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRemove usage of singleton software_slot_ in nss on ChromeOS
tbarzic@chromium.org [Sat, 12 Jul 2014 12:46:17 +0000 (12:46 +0000)]
Remove usage of singleton software_slot_ in nss on ChromeOS

Instead of opening primary user's public slot separately, do it like it's done
for other users: when InitializeNSSForChromeOSUser is called.

This makes primary user's public slot state not dependent on chromeos::TPMTokenLoader.

Also, with this, opening primary users public slot is not bound with enabling
TPM anymore, so the slot may get open for guest user and on Linux ChromeOS.

BUG=383663, 302062

Review URL: https://codereview.chromium.org/317613004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282817 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoMark the ParseIPLiteralToNumber function as NET_EXPORT because it's used
wtc@chromium.org [Sat, 12 Jul 2014 06:20:53 +0000 (06:20 +0000)]
Mark the ParseIPLiteralToNumber function as NET_EXPORT because it's used
by many files outside src/net.

R=eroman@chromium.org,mef@chromium.org
BUG=393387

Review URL: https://codereview.chromium.org/385943004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282808 4ff67af0-8c30-449e-8e8b-ad334ec8d88c