diff options
-rw-r--r-- | remoting/jingle_glue/ssl_socket_adapter.cc | 4 | ||||
-rw-r--r-- | remoting/jingle_glue/ssl_socket_adapter.h | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/remoting/jingle_glue/ssl_socket_adapter.cc b/remoting/jingle_glue/ssl_socket_adapter.cc index d6cf99c..95d129b 100644 --- a/remoting/jingle_glue/ssl_socket_adapter.cc +++ b/remoting/jingle_glue/ssl_socket_adapter.cc @@ -7,6 +7,7 @@ #include "base/compiler_specific.h" #include "base/message_loop.h" #include "net/base/address_list.h" +#include "net/base/cert_verifier.h" #include "net/base/host_port_pair.h" #include "net/base/net_errors.h" #include "net/base/ssl_config_service.h" @@ -24,6 +25,7 @@ SSLSocketAdapter* SSLSocketAdapter::Create(AsyncSocket* socket) { SSLSocketAdapter::SSLSocketAdapter(AsyncSocket* socket) : SSLAdapter(socket), ignore_bad_cert_(false), + cert_verifier_(new net::CertVerifier()), ALLOW_THIS_IN_INITIALIZER_LIST( connected_callback_(this, &SSLSocketAdapter::OnConnected)), ALLOW_THIS_IN_INITIALIZER_LIST( @@ -70,7 +72,7 @@ int SSLSocketAdapter::BeginSSL() { net::ClientSocketFactory::GetDefaultFactory()->CreateSSLClientSocket( transport_socket_, net::HostPortPair(hostname_, 443), ssl_config, NULL /* ssl_host_info */, - NULL /* TODO(wtc): cert_verifier */)); + cert_verifier_.get())); int result = ssl_socket_->Connect(&connected_callback_); diff --git a/remoting/jingle_glue/ssl_socket_adapter.h b/remoting/jingle_glue/ssl_socket_adapter.h index 6c80b26..cda1886 100644 --- a/remoting/jingle_glue/ssl_socket_adapter.h +++ b/remoting/jingle_glue/ssl_socket_adapter.h @@ -15,6 +15,10 @@ #include "third_party/libjingle/source/talk/base/asyncsocket.h" #include "third_party/libjingle/source/talk/base/ssladapter.h" +namespace net { +class CertVerifier; +} // namespace net + namespace remoting { class SSLSocketAdapter; @@ -129,6 +133,7 @@ class SSLSocketAdapter : public talk_base::SSLAdapter { std::string hostname_; TransportSocket* transport_socket_; scoped_ptr<net::SSLClientSocket> ssl_socket_; + scoped_ptr<net::CertVerifier> cert_verifier_; net::CompletionCallbackImpl<SSLSocketAdapter> connected_callback_; net::CompletionCallbackImpl<SSLSocketAdapter> read_callback_; net::CompletionCallbackImpl<SSLSocketAdapter> write_callback_; |