summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/jingle_session.cc
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-23 18:49:18 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-23 18:49:18 +0000
commit40d33caad15e6c989f569a011f9803563d93c529 (patch)
treeccea729b503749063ca5e003409689bc4edc0fb7 /remoting/protocol/jingle_session.cc
parentf4ae0ed7eedbb35d59376c300a6147da2b41c2b7 (diff)
downloadchromium_src-40d33caad15e6c989f569a011f9803563d93c529.zip
chromium_src-40d33caad15e6c989f569a011f9803563d93c529.tar.gz
chromium_src-40d33caad15e6c989f569a011f9803563d93c529.tar.bz2
Send certificate in content description in jingle for Chromoting
Transmit the server certificate to the client via content description. This allow secure encryption between Chromoting host and client. BUG=None TEST=remoting_unittests Review URL: http://codereview.chromium.org/5804001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/jingle_session.cc')
-rw-r--r--remoting/protocol/jingle_session.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc
index bf4b7d8..b151c1df 100644
--- a/remoting/protocol/jingle_session.cc
+++ b/remoting/protocol/jingle_session.cc
@@ -68,9 +68,8 @@ net::SSLClientSocket* CreateSSLClientSocket(
// static
JingleSession* JingleSession::CreateClientSession(
- JingleSessionManager* manager,
- scoped_refptr<net::X509Certificate> certificate) {
- return new JingleSession(manager, certificate, NULL);
+ JingleSessionManager* manager) {
+ return new JingleSession(manager, NULL, NULL);
}
// static
@@ -249,6 +248,10 @@ void JingleSession::set_candidate_config(
candidate_config_.reset(candidate_config);
}
+scoped_refptr<net::X509Certificate> JingleSession::server_certificate() const {
+ return server_cert_;
+}
+
const SessionConfig* JingleSession::config() {
DCHECK(config_.get());
return config_.get();
@@ -414,6 +417,9 @@ void JingleSession::OnAccept() {
const protocol::ContentDescription* content_description =
static_cast<const protocol::ContentDescription*>(content->description);
+ server_cert_ = content_description->certificate();
+ CHECK(server_cert_);
+
SessionConfig* config = content_description->config()->GetFinalConfig();
// Terminate the session if the config we received is invalid.