| Index: webrtc/pc/srtpfilter.h
|
| diff --git a/webrtc/pc/srtpfilter.h b/webrtc/pc/srtpfilter.h
|
| index 46b9dea19f38400abdb38f56cabc2eeece1197fb..3df787646c740eb819f93986e697de0daabf1237 100644
|
| --- a/webrtc/pc/srtpfilter.h
|
| +++ b/webrtc/pc/srtpfilter.h
|
| @@ -114,12 +114,18 @@ class SrtpFilter {
|
| // Returns srtp overhead for rtp packets.
|
| bool GetSrtpOverhead(int* srtp_overhead) const;
|
|
|
| -#if defined(ENABLE_EXTERNAL_AUTH)
|
| + // If external auth is enabled, SRTP will write a dummy auth tag that then
|
| + // later must get replaced before the packet is sent out. Only supported for
|
| + // non-GCM cipher suites and can be checked through "IsExternalAuthActive"
|
| + // if it is actually used. This method is only valid before the RTP params
|
| + // have been set.
|
| + void EnableExternalAuth();
|
| + bool IsExternalAuthEnabled() const;
|
| +
|
| // A SRTP filter supports external creation of the auth tag if a non-GCM
|
| // cipher is used. This method is only valid after the RTP params have
|
| // been set.
|
| bool IsExternalAuthActive() const;
|
| -#endif
|
|
|
| // Update the silent threshold (in ms) for signaling errors.
|
| void set_signal_silent_time(int signal_silent_time_in_ms);
|
| @@ -169,8 +175,9 @@ class SrtpFilter {
|
| // ST_INIT.
|
| ST_RECEIVEDPRANSWER
|
| };
|
| - State state_;
|
| - int signal_silent_time_in_ms_;
|
| + State state_ = ST_INIT;
|
| + int signal_silent_time_in_ms_ = 0;
|
| + bool external_auth_enabled_ = false;
|
| std::vector<CryptoParams> offer_params_;
|
| std::unique_ptr<SrtpSession> send_session_;
|
| std::unique_ptr<SrtpSession> recv_session_;
|
| @@ -213,12 +220,18 @@ class SrtpSession {
|
|
|
| int GetSrtpOverhead() const;
|
|
|
| -#if defined(ENABLE_EXTERNAL_AUTH)
|
| + // If external auth is enabled, SRTP will write a dummy auth tag that then
|
| + // later must get replaced before the packet is sent out. Only supported for
|
| + // non-GCM cipher suites and can be checked through "IsExternalAuthActive"
|
| + // if it is actually used. This method is only valid before the RTP params
|
| + // have been set.
|
| + void EnableExternalAuth();
|
| + bool IsExternalAuthEnabled() const;
|
| +
|
| // A SRTP session supports external creation of the auth tag if a non-GCM
|
| // cipher is used. This method is only valid after the RTP params have
|
| // been set.
|
| bool IsExternalAuthActive() const;
|
| -#endif
|
|
|
| // Update the silent threshold (in ms) for signaling errors.
|
| void set_signal_silent_time(int signal_silent_time_in_ms);
|
| @@ -246,9 +259,8 @@ class SrtpSession {
|
| static bool inited_;
|
| static rtc::GlobalLockPod lock_;
|
| int last_send_seq_num_ = -1;
|
| -#if defined(ENABLE_EXTERNAL_AUTH)
|
| bool external_auth_active_ = false;
|
| -#endif
|
| + bool external_auth_enabled_ = false;
|
| RTC_DISALLOW_COPY_AND_ASSIGN(SrtpSession);
|
| };
|
|
|
|
|