OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_client_session.h" | 5 #include "net/quic/quic_client_session.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 #include "net/quic/crypto/proof_verifier_chromium.h" | 16 #include "net/quic/crypto/proof_verifier_chromium.h" |
17 #include "net/quic/crypto/quic_server_info.h" | 17 #include "net/quic/crypto/quic_server_info.h" |
18 #include "net/quic/quic_connection_helper.h" | 18 #include "net/quic/quic_connection_helper.h" |
19 #include "net/quic/quic_crypto_client_stream_factory.h" | 19 #include "net/quic/quic_crypto_client_stream_factory.h" |
20 #include "net/quic/quic_default_packet_writer.h" | 20 #include "net/quic/quic_default_packet_writer.h" |
21 #include "net/quic/quic_server_id.h" | 21 #include "net/quic/quic_server_id.h" |
22 #include "net/quic/quic_stream_factory.h" | 22 #include "net/quic/quic_stream_factory.h" |
23 #include "net/ssl/server_bound_cert_service.h" | 23 #include "net/ssl/channel_id_service.h" |
24 #include "net/ssl/ssl_connection_status_flags.h" | 24 #include "net/ssl/ssl_connection_status_flags.h" |
25 #include "net/ssl/ssl_info.h" | 25 #include "net/ssl/ssl_info.h" |
26 #include "net/udp/datagram_client_socket.h" | 26 #include "net/udp/datagram_client_socket.h" |
27 | 27 |
28 namespace net { | 28 namespace net { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 // The length of time to wait for a 0-RTT handshake to complete | 32 // The length of time to wait for a 0-RTT handshake to complete |
33 // before allowing the requests to possibly proceed over TCP. | 33 // before allowing the requests to possibly proceed over TCP. |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 // Pooling is prohibited if the server cert is not valid for the new domain, | 492 // Pooling is prohibited if the server cert is not valid for the new domain, |
493 // and for connections on which client certs were sent. It is also prohibited | 493 // and for connections on which client certs were sent. It is also prohibited |
494 // when channel ID was sent if the hosts are from different eTLDs+1. | 494 // when channel ID was sent if the hosts are from different eTLDs+1. |
495 if (!ssl_info.cert->VerifyNameMatch(hostname, &unused)) | 495 if (!ssl_info.cert->VerifyNameMatch(hostname, &unused)) |
496 return false; | 496 return false; |
497 | 497 |
498 if (ssl_info.client_cert_sent) | 498 if (ssl_info.client_cert_sent) |
499 return false; | 499 return false; |
500 | 500 |
501 if (ssl_info.channel_id_sent && | 501 if (ssl_info.channel_id_sent && |
502 ServerBoundCertService::GetDomainForHost(hostname) != | 502 ChannelIDService::GetDomainForHost(hostname) != |
503 ServerBoundCertService::GetDomainForHost(server_host_port_.host())) { | 503 ChannelIDService::GetDomainForHost(server_host_port_.host())) { |
504 return false; | 504 return false; |
505 } | 505 } |
506 | 506 |
507 return true; | 507 return true; |
508 } | 508 } |
509 | 509 |
510 QuicDataStream* QuicClientSession::CreateIncomingDataStream( | 510 QuicDataStream* QuicClientSession::CreateIncomingDataStream( |
511 QuicStreamId id) { | 511 QuicStreamId id) { |
512 DLOG(ERROR) << "Server push not supported"; | 512 DLOG(ERROR) << "Server push not supported"; |
513 return NULL; | 513 return NULL; |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 return; | 850 return; |
851 | 851 |
852 // TODO(rch): re-enable this code once beta is cut. | 852 // TODO(rch): re-enable this code once beta is cut. |
853 // if (stream_factory_) | 853 // if (stream_factory_) |
854 // stream_factory_->OnSessionConnectTimeout(this); | 854 // stream_factory_->OnSessionConnectTimeout(this); |
855 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 855 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
856 // DCHECK_EQ(0u, GetNumOpenStreams()); | 856 // DCHECK_EQ(0u, GetNumOpenStreams()); |
857 } | 857 } |
858 | 858 |
859 } // namespace net | 859 } // namespace net |
OLD | NEW |