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

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

Issue 2641633002: Only set certificate on DTLS transport if fingerprint is found in SDP. (Closed)
Patch Set: Fix tests by making FakeTransportController::Connect put fingerprints in transport descriptions. Created 3 years, 11 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 fd476829c41d05491094e5b184d623d9ca0c05bb..d97b4b618859dbd6ffe867df51ec37ed3e7c5aea 100644
--- a/webrtc/p2p/base/faketransportcontroller.h
+++ b/webrtc/p2p/base/faketransportcontroller.h
@@ -617,12 +617,20 @@ class FakeTransportController : public TransportController {
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,
+ certificate_for_testing()
+ ? rtc::SSLFingerprint::CreateFromCertificate(
+ certificate_for_testing())
+ : nullptr);
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,
+ dest->certificate_for_testing()
+ ? rtc::SSLFingerprint::CreateFromCertificate(
+ dest->certificate_for_testing())
+ : nullptr);
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