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

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

Issue 2761143002: Support encrypted RTP extensions (RFC 6904) (Closed)
Patch Set: Fix compile error on win_x64 bots. Created 3 years, 6 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/dtlstransportinternal.h ('k') | webrtc/pc/channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/fakedtlstransport.h
diff --git a/webrtc/p2p/base/fakedtlstransport.h b/webrtc/p2p/base/fakedtlstransport.h
index 9d5859c4dd51a8c7c968c69a940b35459cc8f505..0384f00a408218be44a4fd89c502da36302251c1 100644
--- a/webrtc/p2p/base/fakedtlstransport.h
+++ b/webrtc/p2p/base/fakedtlstransport.h
@@ -91,6 +91,7 @@ class FakeDtlsTransport : public DtlsTransportInternal {
if (!asymmetric) {
dest->SetDestination(this, true);
}
+ dtls_state_ = DTLS_TRANSPORT_CONNECTED;
ice_transport_->SetDestination(
static_cast<FakeIceTransport*>(dest->ice_transport()), asymmetric);
} else {
@@ -122,6 +123,12 @@ class FakeDtlsTransport : public DtlsTransportInternal {
*role = ssl_role_;
return true;
}
+ const rtc::CryptoOptions& crypto_options() const override {
+ return crypto_options_;
+ }
+ void SetCryptoOptions(const rtc::CryptoOptions& crypto_options) {
+ crypto_options_ = crypto_options;
+ }
bool SetLocalCertificate(
const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override {
local_cert_ = certificate;
@@ -135,9 +142,12 @@ class FakeDtlsTransport : public DtlsTransportInternal {
if (!do_dtls_) {
return false;
}
- *crypto_suite = rtc::SRTP_AES128_CM_SHA1_80;
+ *crypto_suite = crypto_suite_;
return true;
}
+ void SetSrtpCryptoSuite(int crypto_suite) {
+ crypto_suite_ = crypto_suite;
+ }
bool GetSslCipherSuite(int* cipher_suite) override { return false; }
rtc::scoped_refptr<rtc::RTCCertificate> GetLocalCertificate() const override {
return local_cert_;
@@ -230,6 +240,8 @@ class FakeDtlsTransport : public DtlsTransportInternal {
rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12;
rtc::SSLFingerprint dtls_fingerprint_;
rtc::SSLRole ssl_role_ = rtc::SSL_CLIENT;
+ int crypto_suite_ = rtc::SRTP_AES128_CM_SHA1_80;
+ rtc::CryptoOptions crypto_options_;
DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW;
« no previous file with comments | « webrtc/p2p/base/dtlstransportinternal.h ('k') | webrtc/pc/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698