OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // handshake. | 108 // handshake. |
109 bool SetRtcpParams(int send_cs, | 109 bool SetRtcpParams(int send_cs, |
110 const uint8_t* send_key, | 110 const uint8_t* send_key, |
111 int send_key_len, | 111 int send_key_len, |
112 int recv_cs, | 112 int recv_cs, |
113 const uint8_t* recv_key, | 113 const uint8_t* recv_key, |
114 int recv_key_len); | 114 int recv_key_len); |
115 | 115 |
116 void ResetParams(); | 116 void ResetParams(); |
117 | 117 |
118 // Set the header extension ids that should be encrypted for the given source. | 118 // Set the header extension ids that should be encrypted. |
119 // This method doesn't immediately update the SRTP session with the new IDs, | 119 // This method doesn't immediately update the SRTP session with the new IDs, |
120 // and you need to call SetRtpParams for that to happen. | 120 // and you need to call SetRtpParams for that to happen. |
121 void SetEncryptedHeaderExtensionIds(cricket::ContentSource source, | 121 |
122 const std::vector<int>& extension_ids); | 122 void SetSendEncryptedHeaderExtensionIds( |
| 123 const std::vector<int>& send_extension_ids) { |
| 124 send_encrypted_header_extension_ids_ = send_extension_ids; |
| 125 } |
| 126 |
| 127 void SetRecvEncryptedHeaderExtensionIds( |
| 128 const std::vector<int>& recv_extension_ids) { |
| 129 recv_encrypted_header_extension_ids_ = recv_extension_ids; |
| 130 } |
123 | 131 |
124 // If external auth is enabled, SRTP will write a dummy auth tag that then | 132 // If external auth is enabled, SRTP will write a dummy auth tag that then |
125 // later must get replaced before the packet is sent out. Only supported for | 133 // later must get replaced before the packet is sent out. Only supported for |
126 // non-GCM cipher suites and can be checked through "IsExternalAuthActive" | 134 // non-GCM cipher suites and can be checked through "IsExternalAuthActive" |
127 // if it is actually used. This method is only valid before the RTP params | 135 // if it is actually used. This method is only valid before the RTP params |
128 // have been set. | 136 // have been set. |
129 void EnableExternalAuth(); | 137 void EnableExternalAuth(); |
130 bool IsExternalAuthEnabled() const; | 138 bool IsExternalAuthEnabled() const; |
131 | 139 |
132 // A SrtpTransport supports external creation of the auth tag if a non-GCM | 140 // A SrtpTransport supports external creation of the auth tag if a non-GCM |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 std::vector<int> send_encrypted_header_extension_ids_; | 197 std::vector<int> send_encrypted_header_extension_ids_; |
190 std::vector<int> recv_encrypted_header_extension_ids_; | 198 std::vector<int> recv_encrypted_header_extension_ids_; |
191 bool external_auth_enabled_ = false; | 199 bool external_auth_enabled_ = false; |
192 | 200 |
193 int rtp_abs_sendtime_extn_id_ = -1; | 201 int rtp_abs_sendtime_extn_id_ = -1; |
194 }; | 202 }; |
195 | 203 |
196 } // namespace webrtc | 204 } // namespace webrtc |
197 | 205 |
198 #endif // PC_SRTPTRANSPORT_H_ | 206 #endif // PC_SRTPTRANSPORT_H_ |
OLD | NEW |