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

Unified Diff: webrtc/base/sslstreamadapter.cc

Issue 2815513012: Negotiate the same SRTP crypto suites for every DTLS association formed. (Closed)
Patch Set: Merge with master 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
« no previous file with comments | « webrtc/base/sslstreamadapter.h ('k') | webrtc/p2p/base/dtlstransportchannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/sslstreamadapter.cc
diff --git a/webrtc/base/sslstreamadapter.cc b/webrtc/base/sslstreamadapter.cc
index 2f601c625791b4ee1f152bf7a39b33ab62bc7f2e..0927704cd4afa047c9a53187630aee6ffbceda84 100644
--- a/webrtc/base/sslstreamadapter.cc
+++ b/webrtc/base/sslstreamadapter.cc
@@ -95,6 +95,21 @@ CryptoOptions CryptoOptions::NoGcm() {
return options;
}
+std::vector<int> GetSupportedDtlsSrtpCryptoSuites(
+ 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);
+ }
+ // Note: SRTP_AES128_CM_SHA1_80 is what is required to be supported (by
+ // draft-ietf-rtcweb-security-arch), but SRTP_AES128_CM_SHA1_32 is allowed as
+ // well, and saves a few bytes per packet if it ends up selected.
+ crypto_suites.push_back(rtc::SRTP_AES128_CM_SHA1_32);
+ crypto_suites.push_back(rtc::SRTP_AES128_CM_SHA1_80);
+ return crypto_suites;
+}
+
SSLStreamAdapter* SSLStreamAdapter::Create(StreamInterface* stream) {
return new OpenSSLStreamAdapter(stream);
}
« no previous file with comments | « webrtc/base/sslstreamadapter.h ('k') | webrtc/p2p/base/dtlstransportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698