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 "jingle/glue/xmpp_client_socket_factory.h" | 5 #include "jingle/glue/xmpp_client_socket_factory.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "jingle/glue/fake_ssl_client_socket.h" | 8 #include "jingle/glue/fake_ssl_client_socket.h" |
9 #include "jingle/glue/proxy_resolving_client_socket.h" | 9 #include "jingle/glue/proxy_resolving_client_socket.h" |
10 #include "net/socket/client_socket_factory.h" | 10 #include "net/socket/client_socket_factory.h" |
(...skipping 30 matching lines...) Expand all Loading... | |
41 } | 41 } |
42 | 42 |
43 net::SSLClientSocket* XmppClientSocketFactory::CreateSSLClientSocket( | 43 net::SSLClientSocket* XmppClientSocketFactory::CreateSSLClientSocket( |
44 net::ClientSocketHandle* transport_socket, | 44 net::ClientSocketHandle* transport_socket, |
45 const net::HostPortPair& host_and_port) { | 45 const net::HostPortPair& host_and_port) { |
46 net::SSLClientSocketContext context; | 46 net::SSLClientSocketContext context; |
47 context.cert_verifier = | 47 context.cert_verifier = |
48 request_context_getter_->GetURLRequestContext()->cert_verifier(); | 48 request_context_getter_->GetURLRequestContext()->cert_verifier(); |
49 context.transport_security_state = request_context_getter_-> | 49 context.transport_security_state = request_context_getter_-> |
50 GetURLRequestContext()->transport_security_state(); | 50 GetURLRequestContext()->transport_security_state(); |
51 DCHECK(context.transport_security_state); | |
Sergey Ulanov
2012/08/13 17:48:47
transport_security_state is used for HSTS (http://
| |
52 // TODO(rkn): context.server_bound_cert_service is NULL because the | 51 // TODO(rkn): context.server_bound_cert_service is NULL because the |
53 // ServerBoundCertService class is not thread safe. | 52 // ServerBoundCertService class is not thread safe. |
54 return client_socket_factory_->CreateSSLClientSocket( | 53 return client_socket_factory_->CreateSSLClientSocket( |
55 transport_socket, host_and_port, ssl_config_, context); | 54 transport_socket, host_and_port, ssl_config_, context); |
56 } | 55 } |
57 | 56 |
58 | 57 |
59 } // namespace jingle_glue | 58 } // namespace jingle_glue |
OLD | NEW |