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

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

Issue 2594623002: Add disabled certificate check support to IceServer PeerConnection API. (Closed)
Patch Set: Support deprecated OPT_SSLTCP name to prevent API breakage. 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/p2p/base/turnport.h ('k') | webrtc/p2p/client/basicportallocator.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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 if (server_address_.proto == PROTO_UDP && !SharedSocket()) { 322 if (server_address_.proto == PROTO_UDP && !SharedSocket()) {
323 socket_ = socket_factory()->CreateUdpSocket( 323 socket_ = socket_factory()->CreateUdpSocket(
324 rtc::SocketAddress(ip(), 0), min_port(), max_port()); 324 rtc::SocketAddress(ip(), 0), min_port(), max_port());
325 } else if (server_address_.proto == PROTO_TCP || 325 } else if (server_address_.proto == PROTO_TCP ||
326 server_address_.proto == PROTO_TLS) { 326 server_address_.proto == PROTO_TLS) {
327 ASSERT(!SharedSocket()); 327 ASSERT(!SharedSocket());
328 int opts = rtc::PacketSocketFactory::OPT_STUN; 328 int opts = rtc::PacketSocketFactory::OPT_STUN;
329 329
330 // Apply server address TLS and insecure bits to options. 330 // Apply server address TLS and insecure bits to options.
331 if (server_address_.proto == PROTO_TLS) { 331 if (server_address_.proto == PROTO_TLS) {
332 opts |= rtc::PacketSocketFactory::OPT_TLS; 332 if (tls_cert_policy_ ==
333 TlsCertPolicy::TLS_CERT_POLICY_INSECURE_NO_CHECK) {
334 opts |= rtc::PacketSocketFactory::OPT_TLS_INSECURE;
335 } else {
336 opts |= rtc::PacketSocketFactory::OPT_TLS;
337 }
333 } 338 }
339
334 socket_ = socket_factory()->CreateClientTcpSocket( 340 socket_ = socket_factory()->CreateClientTcpSocket(
335 rtc::SocketAddress(ip(), 0), server_address_.address, 341 rtc::SocketAddress(ip(), 0), server_address_.address,
336 proxy(), user_agent(), opts); 342 proxy(), user_agent(), opts);
337 } 343 }
338 344
339 if (!socket_) { 345 if (!socket_) {
340 error_ = SOCKET_ERROR; 346 error_ = SOCKET_ERROR;
341 return false; 347 return false;
342 } 348 }
343 349
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 } else { 1549 } else {
1544 state_ = STATE_UNBOUND; 1550 state_ = STATE_UNBOUND;
1545 port_->FailAndPruneConnection(ext_addr_); 1551 port_->FailAndPruneConnection(ext_addr_);
1546 } 1552 }
1547 } 1553 }
1548 void TurnEntry::OnChannelBindTimeout() { 1554 void TurnEntry::OnChannelBindTimeout() {
1549 state_ = STATE_UNBOUND; 1555 state_ = STATE_UNBOUND;
1550 port_->FailAndPruneConnection(ext_addr_); 1556 port_->FailAndPruneConnection(ext_addr_);
1551 } 1557 }
1552 } // namespace cricket 1558 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/turnport.h ('k') | webrtc/p2p/client/basicportallocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698