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

Side by Side Diff: webrtc/p2p/base/dtlstransportchannel.cc

Issue 1337673002: Change WebRTC SslCipher to be exposed as number only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 ssl_role_ = role; 180 ssl_role_ = role;
181 return true; 181 return true;
182 } 182 }
183 183
184 bool DtlsTransportChannelWrapper::GetSslRole(rtc::SSLRole* role) const { 184 bool DtlsTransportChannelWrapper::GetSslRole(rtc::SSLRole* role) const {
185 *role = ssl_role_; 185 *role = ssl_role_;
186 return true; 186 return true;
187 } 187 }
188 188
189 bool DtlsTransportChannelWrapper::GetSslCipher(std::string* cipher) { 189 bool DtlsTransportChannelWrapper::GetSslCipherSuite(uint16_t* cipher) {
190 if (dtls_state_ != STATE_OPEN) { 190 if (dtls_state_ != STATE_OPEN) {
191 return false; 191 return false;
192 } 192 }
193 193
194 return dtls_->GetSslCipher(cipher); 194 return dtls_->GetSslCipherSuite(cipher);
195 } 195 }
196 196
197 bool DtlsTransportChannelWrapper::SetRemoteFingerprint( 197 bool DtlsTransportChannelWrapper::SetRemoteFingerprint(
198 const std::string& digest_alg, 198 const std::string& digest_alg,
199 const uint8* digest, 199 const uint8* digest,
200 size_t digest_len) { 200 size_t digest_len) {
201 201
202 rtc::Buffer remote_fingerprint_value(digest, digest_len); 202 rtc::Buffer remote_fingerprint_value(digest, digest_len);
203 203
204 if (dtls_state_ != STATE_NONE && 204 if (dtls_state_ != STATE_NONE &&
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 dtls_state_ != STATE_OFFERED && 323 dtls_state_ != STATE_OFFERED &&
324 dtls_state_ != STATE_ACCEPTED) { 324 dtls_state_ != STATE_ACCEPTED) {
325 ASSERT(false); 325 ASSERT(false);
326 return false; 326 return false;
327 } 327 }
328 328
329 srtp_ciphers_ = ciphers; 329 srtp_ciphers_ = ciphers;
330 return true; 330 return true;
331 } 331 }
332 332
333 bool DtlsTransportChannelWrapper::GetSrtpCipher(std::string* cipher) { 333 bool DtlsTransportChannelWrapper::GetSrtpCryptoSuite(std::string* cipher) {
334 if (dtls_state_ != STATE_OPEN) { 334 if (dtls_state_ != STATE_OPEN) {
335 return false; 335 return false;
336 } 336 }
337 337
338 return dtls_->GetDtlsSrtpCipher(cipher); 338 return dtls_->GetDtlsSrtpCipher(cipher);
339 } 339 }
340 340
341 341
342 // Called from upper layers to send a media packet. 342 // Called from upper layers to send a media packet.
343 int DtlsTransportChannelWrapper::SendPacket( 343 int DtlsTransportChannelWrapper::SendPacket(
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 SignalRouteChange(this, candidate); 614 SignalRouteChange(this, candidate);
615 } 615 }
616 616
617 void DtlsTransportChannelWrapper::OnConnectionRemoved( 617 void DtlsTransportChannelWrapper::OnConnectionRemoved(
618 TransportChannelImpl* channel) { 618 TransportChannelImpl* channel) {
619 ASSERT(channel == channel_); 619 ASSERT(channel == channel_);
620 SignalConnectionRemoved(this); 620 SignalConnectionRemoved(this);
621 } 621 }
622 622
623 } // namespace cricket 623 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.h ('k') | webrtc/p2p/base/dtlstransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698