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

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

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/p2p/base/transportcontroller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/transportdescriptionfactory.cc
diff --git a/webrtc/p2p/base/transportdescriptionfactory.cc b/webrtc/p2p/base/transportdescriptionfactory.cc
index 61e2a9f3463bc16472bcfcbd01ef0f3d412712b2..238e1b66a14b46d0be228c6f613237d4c3798d95 100644
--- a/webrtc/p2p/base/transportdescriptionfactory.cc
+++ b/webrtc/p2p/base/transportdescriptionfactory.cc
@@ -110,7 +110,12 @@ bool TransportDescriptionFactory::SetSecurityInfo(
// This digest algorithm is used to produce the a=fingerprint lines in SDP.
// RFC 4572 Section 5 requires that those lines use the same hash function as
- // the certificate's signature.
+ // the certificate's signature, which is what CreateFromCertificate does.
+ desc->identity_fingerprint.reset(
+ rtc::SSLFingerprint::CreateFromCertificate(certificate_));
+ if (!desc->identity_fingerprint) {
+ return false;
+ }
std::string digest_alg;
if (!certificate_->ssl_certificate().GetSignatureDigestAlgorithm(
&digest_alg)) {
« no previous file with comments | « webrtc/p2p/base/transportcontroller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698