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

Side by Side Diff: webrtc/api/peerconnectioninterface.h

Issue 2557803002: Add disabled certificate check support to IceServer PeerConnection API. (Closed)
Patch Set: Get rid of tlsOpts unused warning once and for all by actually using it. Created 4 years 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/api/peerconnection_unittest.cc ('k') | webrtc/p2p/base/basicpacketsocketfactory.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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 kIceConnectionNew, 202 kIceConnectionNew,
203 kIceConnectionChecking, 203 kIceConnectionChecking,
204 kIceConnectionConnected, 204 kIceConnectionConnected,
205 kIceConnectionCompleted, 205 kIceConnectionCompleted,
206 kIceConnectionFailed, 206 kIceConnectionFailed,
207 kIceConnectionDisconnected, 207 kIceConnectionDisconnected,
208 kIceConnectionClosed, 208 kIceConnectionClosed,
209 kIceConnectionMax, 209 kIceConnectionMax,
210 }; 210 };
211 211
212 // TLS certificate policy.
213 enum TlsCertPolicy {
214 // For TLS based protocols, ensure the connection is secure by not
215 // circumventing certificate validation.
216 kTlsCertPolicySecure,
217 // For TLS based protocols, disregard security completely by skipping
218 // certificate validation. This is insecure and should never be used unless
219 // security is irrelevant in that particular context.
220 kTlsCertPolicyInsecureNoCheck,
221 };
222
212 struct IceServer { 223 struct IceServer {
213 // TODO(jbauch): Remove uri when all code using it has switched to urls. 224 // TODO(jbauch): Remove uri when all code using it has switched to urls.
214 std::string uri; 225 std::string uri;
215 std::vector<std::string> urls; 226 std::vector<std::string> urls;
216 std::string username; 227 std::string username;
217 std::string password; 228 std::string password;
229 TlsCertPolicy tls_cert_policy = kTlsCertPolicySecure;
230
218 bool operator==(const IceServer& o) const { 231 bool operator==(const IceServer& o) const {
219 return uri == o.uri && urls == o.urls && username == o.username && 232 return uri == o.uri && urls == o.urls && username == o.username &&
220 password == o.password; 233 password == o.password && tls_cert_policy == o.tls_cert_policy;
221 } 234 }
222 bool operator!=(const IceServer& o) const { return !(*this == o); } 235 bool operator!=(const IceServer& o) const { return !(*this == o); }
223 }; 236 };
224 typedef std::vector<IceServer> IceServers; 237 typedef std::vector<IceServer> IceServers;
225 238
226 enum IceTransportsType { 239 enum IceTransportsType {
227 // TODO(pthatcher): Rename these kTransporTypeXXX, but update 240 // TODO(pthatcher): Rename these kTransporTypeXXX, but update
228 // Chromium at the same time. 241 // Chromium at the same time.
229 kNone, 242 kNone,
230 kRelay, 243 kRelay,
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 cricket::WebRtcVideoEncoderFactory* encoder_factory, 841 cricket::WebRtcVideoEncoderFactory* encoder_factory,
829 cricket::WebRtcVideoDecoderFactory* decoder_factory) { 842 cricket::WebRtcVideoDecoderFactory* decoder_factory) {
830 return CreatePeerConnectionFactory( 843 return CreatePeerConnectionFactory(
831 worker_and_network_thread, worker_and_network_thread, signaling_thread, 844 worker_and_network_thread, worker_and_network_thread, signaling_thread,
832 default_adm, encoder_factory, decoder_factory); 845 default_adm, encoder_factory, decoder_factory);
833 } 846 }
834 847
835 } // namespace webrtc 848 } // namespace webrtc
836 849
837 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 850 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « webrtc/api/peerconnection_unittest.cc ('k') | webrtc/p2p/base/basicpacketsocketfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698