OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "remoting/protocol/jingle_session.h" | 5 #include "remoting/protocol/jingle_session.h" |
6 | 6 |
7 #include "base/crypto/rsa_private_key.h" | 7 #include "base/crypto/rsa_private_key.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "net/base/cert_verifier.h" | 9 #include "net/base/cert_verifier.h" |
10 #include "net/base/host_port_pair.h" | 10 #include "net/base/host_port_pair.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // Helper method to create a SSL client socket. | 42 // Helper method to create a SSL client socket. |
43 net::SSLClientSocket* CreateSSLClientSocket( | 43 net::SSLClientSocket* CreateSSLClientSocket( |
44 net::ClientSocket* socket, scoped_refptr<net::X509Certificate> cert, | 44 net::ClientSocket* socket, scoped_refptr<net::X509Certificate> cert, |
45 net::CertVerifier* cert_verifier) { | 45 net::CertVerifier* cert_verifier) { |
46 net::SSLConfig ssl_config; | 46 net::SSLConfig ssl_config; |
47 ssl_config.false_start_enabled = false; | 47 ssl_config.false_start_enabled = false; |
48 ssl_config.snap_start_enabled = false; | 48 ssl_config.snap_start_enabled = false; |
49 ssl_config.ssl3_enabled = true; | 49 ssl_config.ssl3_enabled = true; |
50 ssl_config.tls1_enabled = true; | 50 ssl_config.tls1_enabled = true; |
51 ssl_config.session_resume_disabled = true; | |
52 | 51 |
53 // Certificate provided by the host doesn't need authority. | 52 // Certificate provided by the host doesn't need authority. |
54 net::SSLConfig::CertAndStatus cert_and_status; | 53 net::SSLConfig::CertAndStatus cert_and_status; |
55 cert_and_status.cert_status = net::ERR_CERT_AUTHORITY_INVALID; | 54 cert_and_status.cert_status = net::ERR_CERT_AUTHORITY_INVALID; |
56 cert_and_status.cert = cert; | 55 cert_and_status.cert = cert; |
57 ssl_config.allowed_bad_certs.push_back(cert_and_status); | 56 ssl_config.allowed_bad_certs.push_back(cert_and_status); |
58 | 57 |
59 // SSLClientSocket takes ownership of the adapter. | 58 // SSLClientSocket takes ownership of the adapter. |
60 net::HostPortPair host_and_pair(JingleSession::kChromotingContentName, 0); | 59 net::HostPortPair host_and_pair(JingleSession::kChromotingContentName, 0); |
61 net::SSLClientSocket* ssl_socket = | 60 net::SSLClientSocket* ssl_socket = |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 if (new_state != state_) { | 505 if (new_state != state_) { |
507 state_ = new_state; | 506 state_ = new_state; |
508 if (!closed_ && state_change_callback_.get()) | 507 if (!closed_ && state_change_callback_.get()) |
509 state_change_callback_->Run(new_state); | 508 state_change_callback_->Run(new_state); |
510 } | 509 } |
511 } | 510 } |
512 | 511 |
513 } // namespace protocol | 512 } // namespace protocol |
514 | 513 |
515 } // namespace remoting | 514 } // namespace remoting |
OLD | NEW |