Skip to content

Commit

Permalink
Bug 1056934 - Part 3: Make it possible to configure TURN TLS servers …
Browse files Browse the repository at this point in the history
…in nICEr. r=drno

MozReview-Commit-ID: 2FotueuPHKn

--HG--
extra : rebase_source : f79dc559b03b540343d15abd07651a09f124bb36
  • Loading branch information
docfaraday committed Jan 3, 2017
1 parent f917fb4 commit b35cd43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions media/mtransport/third_party/nICEr/src/ice/ice_candidate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions media/mtransport/third_party/nICEr/src/ice/ice_ctx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ {
Expand Down

0 comments on commit b35cd43

Please sign in to comment.