Index: webrtc/api/peerconnection.cc |
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc |
index 46bdec594a9c90fcd1630db748921237807902d2..c2f29d1fba1dd98db49b636532cac94ca4e26b11 100644 |
--- a/webrtc/api/peerconnection.cc |
+++ b/webrtc/api/peerconnection.cc |
@@ -284,7 +284,7 @@ bool ParseIceServerUrl(const PeerConnectionInterface::IceServer& server, |
int port = kDefaultStunPort; |
if (service_type == TURNS) { |
port = kDefaultStunTlsPort; |
- turn_transport_type = cricket::PROTO_TCP; |
+ turn_transport_type = cricket::PROTO_TLS; |
} |
std::string address; |
@@ -305,10 +305,15 @@ bool ParseIceServerUrl(const PeerConnectionInterface::IceServer& server, |
break; |
case TURN: |
case TURNS: { |
- bool secure = (service_type == TURNS); |
+ cricket::ProtocolFlags flags = cricket::PROTO_FLAG_NONE; |
+ if (server.tls_certificate_policy == |
+ PeerConnectionInterface::kTlsCertPolicyInsecureNoCheck) { |
+ flags = (cricket::ProtocolFlags)( |
+ flags | cricket::PROTO_FLAG_INSECURE_CERT_CHECK); |
+ } |
turn_servers->push_back( |
cricket::RelayServerConfig(address, port, username, server.password, |
- turn_transport_type, secure)); |
+ turn_transport_type, flags)); |
pthatcher1
2016/12/07 21:29:35
Attaching flags onto relay servers feels like the
Taylor Brandstetter
2016/12/08 01:36:40
I disagree. "Verify certificate or not?" is fundam
pthatcher1
2016/12/08 02:36:13
Perhaps I misunderstood the use case we're trying
Taylor Brandstetter
2016/12/08 18:51:39
Maybe there's no obvious use case right now. But:
hnsl1
2016/12/12 16:08:13
Imagine a scenario where you have a RTCConfigurati
pthatcher1
2016/12/12 23:12:29
OK, I think I understand the use case. Let's talk
|
break; |
} |
case INVALID: |