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

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

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.cc ('k') | webrtc/p2p/base/dtlstransportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/dtlstransportchannel.h
diff --git a/webrtc/p2p/base/dtlstransportchannel.h b/webrtc/p2p/base/dtlstransportchannel.h
index d16d8a64dd9f384b870771e1a1dbfc1bef51faff..65ff4424fbe3ab222e647f63b4765b06d174ef1c 100644
--- a/webrtc/p2p/base/dtlstransportchannel.h
+++ b/webrtc/p2p/base/dtlstransportchannel.h
@@ -86,9 +86,12 @@ class StreamInterfaceChannel : public rtc::StreamInterface {
// into packet writes on ice_transport_.
class DtlsTransport : public DtlsTransportInternal {
public:
- // The parameters here is:
- // ice_transport -- the ice transport we are wrapping
- explicit DtlsTransport(IceTransportInternal* ice_transport);
+ // |ice_transport| is the ICE transport this DTLS transport is wrapping.
+ //
+ // |crypto_options| are the options used for the DTLS handshake. This affects
+ // whether GCM crypto suites are negotiated.
+ explicit DtlsTransport(IceTransportInternal* ice_transport,
+ const rtc::CryptoOptions& crypto_options);
~DtlsTransport() override;
DtlsTransportState dtls_state() const override { return dtls_state_; }
@@ -122,11 +125,6 @@ class DtlsTransport : public DtlsTransportInternal {
virtual bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version);
- // Set up the ciphers to use for DTLS-SRTP. If this method is not called
- // before DTLS starts, or |ciphers| is empty, SRTP keys won't be negotiated.
- // This method should be called before SetupDtls.
- bool SetSrtpCryptoSuites(const std::vector<int>& ciphers) override;
-
// Find out which DTLS-SRTP cipher was negotiated
bool GetSrtpCryptoSuite(int* cipher) override;
@@ -174,14 +172,6 @@ class DtlsTransport : public DtlsTransportInternal {
return ice_transport_->SetOption(opt, value);
}
- bool SetSrtpCiphers(const std::vector<std::string>& ciphers) override {
- std::vector<int> crypto_suites;
- for (const auto cipher : ciphers) {
- crypto_suites.push_back(rtc::SrtpCryptoSuiteFromName(cipher));
- }
- return SetSrtpCryptoSuites(crypto_suites);
- }
-
std::string ToString() const {
const char RECEIVING_ABBREV[2] = {'_', 'R'};
const char WRITABLE_ABBREV[2] = {'_', 'W'};
« no previous file with comments | « webrtc/base/sslstreamadapter.cc ('k') | webrtc/p2p/base/dtlstransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698