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

Unified Diff: webrtc/pc/mediasession.cc

Issue 2815513012: Negotiate the same SRTP crypto suites for every DTLS association formed. (Closed)
Patch Set: Created 3 years, 8 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
Index: webrtc/pc/mediasession.cc
diff --git a/webrtc/pc/mediasession.cc b/webrtc/pc/mediasession.cc
index dbd32566d523d3d67d8ca3be8fee17e7190fcf9f..b34cb76188a2097c1f63b1231c11206d8c166f0f 100644
--- a/webrtc/pc/mediasession.cc
+++ b/webrtc/pc/mediasession.cc
@@ -197,7 +197,7 @@ void GetSupportedAudioCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
void GetSupportedVideoCryptoSuites(const rtc::CryptoOptions& crypto_options,
std::vector<int>* crypto_suites) {
- GetDefaultSrtpCryptoSuites(crypto_options, crypto_suites);
+ rtc::GetDefaultSrtpCryptoSuites(crypto_options, crypto_suites);
}
void GetSupportedVideoCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
@@ -208,7 +208,7 @@ void GetSupportedVideoCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
void GetSupportedDataCryptoSuites(const rtc::CryptoOptions& crypto_options,
std::vector<int>* crypto_suites) {
- GetDefaultSrtpCryptoSuites(crypto_options, crypto_suites);
+ rtc::GetDefaultSrtpCryptoSuites(crypto_options, crypto_suites);
}
void GetSupportedDataCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
@@ -217,19 +217,10 @@ void GetSupportedDataCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
crypto_options, crypto_suite_names);
}
-void GetDefaultSrtpCryptoSuites(const rtc::CryptoOptions& crypto_options,
- std::vector<int>* crypto_suites) {
- if (crypto_options.enable_gcm_crypto_suites) {
- crypto_suites->push_back(rtc::SRTP_AEAD_AES_256_GCM);
- crypto_suites->push_back(rtc::SRTP_AEAD_AES_128_GCM);
- }
- crypto_suites->push_back(rtc::SRTP_AES128_CM_SHA1_80);
-}
-
void GetDefaultSrtpCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
std::vector<std::string>* crypto_suite_names) {
- GetSupportedCryptoSuiteNames(GetDefaultSrtpCryptoSuites,
- crypto_options, crypto_suite_names);
+ GetSupportedCryptoSuiteNames(rtc::GetDefaultSrtpCryptoSuites, crypto_options,
+ crypto_suite_names);
}
// Support any GCM cipher (if enabled through options). For video support only

Powered by Google App Engine
This is Rietveld 408576698