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

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

Issue 1458023002: Reland Convert internal representation of Srtp cryptos from string to int (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « webrtc/base/sslstreamadapter_unittest.cc ('k') | webrtc/p2p/base/dtlstransportchannel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool GetStats(ConnectionInfos* infos) override { 119 bool GetStats(ConnectionInfos* infos) override {
120 return channel_->GetStats(infos); 120 return channel_->GetStats(infos);
121 } 121 }
122 const std::string SessionId() const override { return channel_->SessionId(); } 122 const std::string SessionId() const override { return channel_->SessionId(); }
123 123
124 virtual bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version); 124 virtual bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version);
125 125
126 // Set up the ciphers to use for DTLS-SRTP. If this method is not called 126 // Set up the ciphers to use for DTLS-SRTP. If this method is not called
127 // before DTLS starts, or |ciphers| is empty, SRTP keys won't be negotiated. 127 // before DTLS starts, or |ciphers| is empty, SRTP keys won't be negotiated.
128 // This method should be called before SetupDtls. 128 // This method should be called before SetupDtls.
129 bool SetSrtpCiphers(const std::vector<std::string>& ciphers) override; 129 bool SetSrtpCryptoSuites(const std::vector<int>& ciphers) override;
130 130
131 // Find out which DTLS-SRTP cipher was negotiated 131 // Find out which DTLS-SRTP cipher was negotiated
132 bool GetSrtpCryptoSuite(std::string* cipher) override; 132 bool GetSrtpCryptoSuite(int* cipher) override;
133 133
134 bool GetSslRole(rtc::SSLRole* role) const override; 134 bool GetSslRole(rtc::SSLRole* role) const override;
135 bool SetSslRole(rtc::SSLRole role) override; 135 bool SetSslRole(rtc::SSLRole role) override;
136 136
137 // Find out which DTLS cipher was negotiated 137 // Find out which DTLS cipher was negotiated
138 bool GetSslCipherSuite(int* cipher) override; 138 bool GetSslCipherSuite(int* cipher) override;
139 139
140 // Once DTLS has been established, this method retrieves the certificate in 140 // Once DTLS has been established, this method retrieves the certificate in
141 // use by the remote peer, for use in external identity verification. 141 // use by the remote peer, for use in external identity verification.
142 bool GetRemoteSSLCertificate(rtc::SSLCertificate** cert) const override; 142 bool GetRemoteSSLCertificate(rtc::SSLCertificate** cert) const override;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 void OnRoleConflict(TransportChannelImpl* channel); 216 void OnRoleConflict(TransportChannelImpl* channel);
217 void OnRouteChange(TransportChannel* channel, const Candidate& candidate); 217 void OnRouteChange(TransportChannel* channel, const Candidate& candidate);
218 void OnConnectionRemoved(TransportChannelImpl* channel); 218 void OnConnectionRemoved(TransportChannelImpl* channel);
219 219
220 Transport* transport_; // The transport_ that created us. 220 Transport* transport_; // The transport_ that created us.
221 rtc::Thread* worker_thread_; // Everything should occur on this thread. 221 rtc::Thread* worker_thread_; // Everything should occur on this thread.
222 // Underlying channel, owned by transport_. 222 // Underlying channel, owned by transport_.
223 TransportChannelImpl* const channel_; 223 TransportChannelImpl* const channel_;
224 rtc::scoped_ptr<rtc::SSLStreamAdapter> dtls_; // The DTLS stream 224 rtc::scoped_ptr<rtc::SSLStreamAdapter> dtls_; // The DTLS stream
225 StreamInterfaceChannel* downward_; // Wrapper for channel_, owned by dtls_. 225 StreamInterfaceChannel* downward_; // Wrapper for channel_, owned by dtls_.
226 std::vector<std::string> srtp_ciphers_; // SRTP ciphers to use with DTLS. 226 std::vector<int> srtp_ciphers_; // SRTP ciphers to use with DTLS.
227 bool dtls_active_ = false; 227 bool dtls_active_ = false;
228 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; 228 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_;
229 rtc::SSLRole ssl_role_; 229 rtc::SSLRole ssl_role_;
230 rtc::SSLProtocolVersion ssl_max_version_; 230 rtc::SSLProtocolVersion ssl_max_version_;
231 rtc::Buffer remote_fingerprint_value_; 231 rtc::Buffer remote_fingerprint_value_;
232 std::string remote_fingerprint_algorithm_; 232 std::string remote_fingerprint_algorithm_;
233 233
234 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportChannelWrapper); 234 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportChannelWrapper);
235 }; 235 };
236 236
237 } // namespace cricket 237 } // namespace cricket
238 238
239 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ 239 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/base/sslstreamadapter_unittest.cc ('k') | webrtc/p2p/base/dtlstransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698