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

Unified Diff: webrtc/p2p/base/faketransportcontroller.h

Issue 2681403002: Merge to M57: Only set certificate on DTLS transport if fingerprint is found in SDP. (Closed)
Patch Set: Changing upstream branch to m57 Created 3 years, 10 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/base/sslfingerprint.cc ('k') | webrtc/p2p/base/jseptransport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/faketransportcontroller.h
diff --git a/webrtc/p2p/base/faketransportcontroller.h b/webrtc/p2p/base/faketransportcontroller.h
index a73d464ece548bc05d3b0b1fcaf0cac7c24dfc0e..db12ca5f055f637ef45244cd218a5f01777fbb47 100644
--- a/webrtc/p2p/base/faketransportcontroller.h
+++ b/webrtc/p2p/base/faketransportcontroller.h
@@ -625,16 +625,28 @@ class FakeTransportController : public TransportController {
// exchange of ICE candidates.
void Connect(FakeTransportController* dest) {
for (const std::string& transport_name : transport_names_for_testing()) {
+ std::unique_ptr<rtc::SSLFingerprint> local_fingerprint;
+ std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint;
+ if (certificate_for_testing()) {
+ local_fingerprint.reset(rtc::SSLFingerprint::CreateFromCertificate(
+ certificate_for_testing()));
+ }
+ if (dest->certificate_for_testing()) {
+ remote_fingerprint.reset(rtc::SSLFingerprint::CreateFromCertificate(
+ dest->certificate_for_testing()));
+ }
TransportDescription local_desc(
std::vector<std::string>(),
rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH),
rtc::CreateRandomString(cricket::ICE_PWD_LENGTH),
- cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_NONE, nullptr);
+ cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_NONE,
+ local_fingerprint.get());
TransportDescription remote_desc(
std::vector<std::string>(),
rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH),
rtc::CreateRandomString(cricket::ICE_PWD_LENGTH),
- cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_NONE, nullptr);
+ cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_NONE,
+ remote_fingerprint.get());
std::string err;
SetLocalTransportDescription(transport_name, local_desc,
cricket::CA_OFFER, &err);
« no previous file with comments | « webrtc/base/sslfingerprint.cc ('k') | webrtc/p2p/base/jseptransport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698