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/notifier/base/fake_ssl_client_socket.h" | 5 #include "jingle/glue/fake_ssl_client_socket.h" |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 | 14 |
15 namespace notifier { | 15 namespace jingle_glue { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // The constants below were taken from libjingle's socketadapters.cc. | 19 // The constants below were taken from libjingle's socketadapters.cc. |
20 // Basically, we do a "fake" SSL handshake to fool proxies into | 20 // Basically, we do a "fake" SSL handshake to fool proxies into |
21 // thinking this is a real SSL connection. | 21 // thinking this is a real SSL connection. |
22 | 22 |
23 // This is a SSL v2 CLIENT_HELLO message. | 23 // This is a SSL v2 CLIENT_HELLO message. |
24 // TODO(juberti): Should this have a session id? The response doesn't have a | 24 // TODO(juberti): Should this have a session id? The response doesn't have a |
25 // certificate, so the hello should have a session id. | 25 // certificate, so the hello should have a session id. |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 } | 343 } |
344 | 344 |
345 net::NextProto FakeSSLClientSocket::GetNegotiatedProtocol() const { | 345 net::NextProto FakeSSLClientSocket::GetNegotiatedProtocol() const { |
346 return transport_socket_->GetNegotiatedProtocol(); | 346 return transport_socket_->GetNegotiatedProtocol(); |
347 } | 347 } |
348 | 348 |
349 bool FakeSSLClientSocket::GetSSLInfo(net::SSLInfo* ssl_info) { | 349 bool FakeSSLClientSocket::GetSSLInfo(net::SSLInfo* ssl_info) { |
350 return transport_socket_->GetSSLInfo(ssl_info); | 350 return transport_socket_->GetSSLInfo(ssl_info); |
351 } | 351 } |
352 | 352 |
353 } // namespace notifier | 353 } // namespace jingle_glue |
OLD | NEW |