Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: webrtc/p2p/base/session.cc

Issue 1312643004: Replaces SSLIdentity* with scoped_refptr<RTCCertificate> in cricket::Transport layer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: certificate_for_testing() Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/session.h ('k') | webrtc/p2p/base/transport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/session.cc
diff --git a/webrtc/p2p/base/session.cc b/webrtc/p2p/base/session.cc
index 6c185113f9226e0d5bc9b4e48832fe7cc2805aa4..23680b9be83b858ab7c8a19127e73e4510adfb6b 100644
--- a/webrtc/p2p/base/session.cc
+++ b/webrtc/p2p/base/session.cc
@@ -277,9 +277,9 @@ bool TransportProxy::OnRemoteCandidates(const Candidates& candidates,
return true;
}
-void TransportProxy::SetIdentity(
- rtc::SSLIdentity* identity) {
- transport_->get()->SetIdentity(identity);
+void TransportProxy::SetCertificate(
+ const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) {
+ transport_->get()->SetCertificate(certificate);
}
std::string BaseSession::StateToString(State state) {
@@ -336,7 +336,6 @@ BaseSession::BaseSession(rtc::Thread* signaling_thread,
sid_(sid),
content_type_(content_type),
initiator_(initiator),
- identity_(NULL),
ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10),
ice_tiebreaker_(rtc::CreateRandomId64()),
role_switch_(false),
@@ -390,13 +389,16 @@ const SessionDescription* BaseSession::initiator_description() const {
return initiator_ ? local_description_.get() : remote_description_.get();
}
-bool BaseSession::SetIdentity(rtc::SSLIdentity* identity) {
- if (identity_)
+bool BaseSession::SetCertificate(
+ const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) {
+ if (certificate_)
return false;
- identity_ = identity;
+ if (!certificate)
+ return false;
+ certificate_ = certificate;
for (TransportMap::iterator iter = transports_.begin();
iter != transports_.end(); ++iter) {
- iter->second->SetIdentity(identity_);
+ iter->second->SetCertificate(certificate_);
}
return true;
}
@@ -543,8 +545,8 @@ TransportProxy* BaseSession::GetOrCreateTransportProxy(
new TransportWrapper(transport));
transproxy->SignalCandidatesReady.connect(
this, &BaseSession::OnTransportProxyCandidatesReady);
- if (identity_)
- transproxy->SetIdentity(identity_);
+ if (certificate_)
+ transproxy->SetCertificate(certificate_);
transports_[content_name] = transproxy;
return transproxy;
@@ -575,7 +577,7 @@ void BaseSession::DestroyTransportProxy(
Transport* BaseSession::CreateTransport(const std::string& content_name) {
Transport* transport = new DtlsTransport<P2PTransport>(
signaling_thread(), worker_thread(), content_name, port_allocator(),
- identity_);
+ certificate_);
transport->SetChannelReceivingTimeout(ice_receiving_timeout_);
return transport;
}
« no previous file with comments | « webrtc/p2p/base/session.h ('k') | webrtc/p2p/base/transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698