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

Unified Diff: webrtc/pc/channel.h

Issue 1528843005: Add support for GCM cipher suites from RFC 7714. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Feedback from Matt Created 4 years, 7 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/channel.h
diff --git a/webrtc/pc/channel.h b/webrtc/pc/channel.h
index 4518301d3b65e9e6fdf89586d258b519e42a4677..4268fd3add0cce6d97325090b54654ae826ecff6 100644
--- a/webrtc/pc/channel.h
+++ b/webrtc/pc/channel.h
@@ -158,6 +158,8 @@ class BaseChannel
SrtpFilter* srtp_filter() { return &srtp_filter_; }
+ bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options);
+
protected:
virtual MediaChannel* media_channel() const { return media_channel_; }
// Sets the |transport_channel_| (and |rtcp_transport_channel_|, if |rtcp_| is
@@ -281,6 +283,10 @@ class BaseChannel
// From MessageHandler
void OnMessage(rtc::Message* pmsg) override;
+ const rtc::CryptoOptions& crypto_options() const {
+ return crypto_options_;
+ }
+
// Handled in derived classes
// Get the SRTP crypto suites to use for RTP media
virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const = 0;
@@ -321,6 +327,7 @@ class BaseChannel
bool has_received_packet_;
bool dtls_keyed_;
bool secure_required_;
+ rtc::CryptoOptions crypto_options_;
int rtp_abs_sendtime_extn_id_;
};
@@ -411,7 +418,7 @@ class VoiceChannel : public BaseChannel {
bool GetStats_w(VoiceMediaInfo* stats);
virtual void OnMessage(rtc::Message* pmsg);
- virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const;
+ void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const override;
virtual void OnConnectionMonitorUpdate(
ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
virtual void OnMediaMonitorUpdate(
@@ -482,7 +489,7 @@ class VideoChannel : public BaseChannel {
bool SetRtpParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters);
virtual void OnMessage(rtc::Message* pmsg);
- virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const;
+ void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const override;
virtual void OnConnectionMonitorUpdate(
ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
virtual void OnMediaMonitorUpdate(
@@ -592,7 +599,7 @@ class DataChannel : public BaseChannel {
virtual bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet);
virtual void OnMessage(rtc::Message* pmsg);
- virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const;
+ void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const override;
virtual void OnConnectionMonitorUpdate(
ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
virtual void OnMediaMonitorUpdate(

Powered by Google App Engine
This is Rietveld 408576698