mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 02:47:31 +09:00
Issue #1991 - Support TURN TLS Support in WebRTC Backport of Mozilla bug 1056934
This commit is contained in:
parent
1270657ba0
commit
2dc4713d14
16 changed files with 282 additions and 26 deletions
|
|
@ -666,6 +666,14 @@ static int nr_ice_candidate_resolved_cb(void *cb_arg, nr_transport_addr *addr)
|
|||
if(r=nr_transport_addr_copy(&cand->stun_server_addr,addr))
|
||||
ABORT(r);
|
||||
|
||||
if (cand->stun_server->tls) {
|
||||
/* Copy over the DNS name; needed for TLS. There is already a null at the
|
||||
* end of the buffer, leave it there. */
|
||||
strncpy(cand->stun_server_addr.tls_host,
|
||||
cand->stun_server->u.dnsname.host,
|
||||
sizeof(cand->stun_server_addr.tls_host) - 1);
|
||||
}
|
||||
|
||||
if (cand->tcp_type == TCP_TYPE_PASSIVE || cand->tcp_type == TCP_TYPE_SO){
|
||||
if (r=nr_socket_multi_tcp_stun_server_connect(cand->osock, addr))
|
||||
ABORT(r);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ typedef struct nr_ice_stun_server_ {
|
|||
} u;
|
||||
int id;
|
||||
int transport;
|
||||
int tls; /* Whether to use TLS or not */
|
||||
} nr_ice_stun_server;
|
||||
|
||||
typedef struct nr_ice_turn_server_ {
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ typedef struct nr_transport_addr_ {
|
|||
/* A string version.
|
||||
56 = 5 ("IP6:[") + 39 (ipv6 address) + 2 ("]:") + 5 (port) + 4 (/UDP) + 1 (null) */
|
||||
char as_string[56];
|
||||
char tls_host[256];
|
||||
} nr_transport_addr;
|
||||
|
||||
typedef struct nr_transport_addr_mask_ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue