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

Unified Diff: webrtc/api/test/fakertccertificategenerator.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/api/peerconnectioninterface_unittest.cc ('k') | webrtc/base/sslfingerprint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/test/fakertccertificategenerator.h
diff --git a/webrtc/api/test/fakertccertificategenerator.h b/webrtc/api/test/fakertccertificategenerator.h
index 34fc1c53a91f91543a0e68967d87a29c3741fb78..cd1e4bf5b8c1d242d0ccd2e4640ff028f2a1df34 100644
--- a/webrtc/api/test/fakertccertificategenerator.h
+++ b/webrtc/api/test/fakertccertificategenerator.h
@@ -134,6 +134,8 @@ class FakeRTCCertificateGenerator
void use_original_key() { key_index_ = 0; }
void use_alternate_key() { key_index_ = 1; }
+ int generated_certificates() { return generated_certificates_; }
+
void GenerateCertificateAsync(
const rtc::KeyParams& key_params,
const rtc::Optional<uint64_t>& expires_ms,
@@ -210,6 +212,7 @@ class FakeRTCCertificateGenerator
msg->message_id == MSG_SUCCESS_RSA ? rtc::KT_RSA : rtc::KT_ECDSA;
certificate = rtc::RTCCertificate::FromPEM(get_pem(key_type));
RTC_DCHECK(certificate);
+ ++generated_certificates_;
callback->OnSuccess(certificate);
break;
}
@@ -222,6 +225,7 @@ class FakeRTCCertificateGenerator
bool should_fail_;
int key_index_ = 0;
+ int generated_certificates_ = 0;
};
#endif // WEBRTC_API_TEST_FAKERTCCERTIFICATEGENERATOR_H_
« no previous file with comments | « webrtc/api/peerconnectioninterface_unittest.cc ('k') | webrtc/base/sslfingerprint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698