Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
f163325e
Commit
f163325e
authored
Sep 17, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base64 decode the msn user/pass for TURN too
parent
fc7c77e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
agent/discovery.c
agent/discovery.c
+17
-4
udp/udp-turn.c
udp/udp-turn.c
+10
-4
No files found.
agent/discovery.c
View file @
f163325e
...
...
@@ -697,16 +697,29 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
buffer_len
=
stun_usage_bind_create
(
&
agent
->
stun_agent
,
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
));
}
else
if
(
cand
->
type
==
NICE_CANDIDATE_TYPE_RELAYED
)
{
uint8_t
*
username
=
(
uint8_t
*
)
cand
->
component
->
turn_username
;
size_t
username_len
=
(
size_t
)
strlen
(
cand
->
component
->
turn_username
);
uint8_t
*
password
=
(
uint8_t
*
)
cand
->
component
->
turn_password
;
size_t
password_len
=
(
size_t
)
strlen
(
cand
->
component
->
turn_password
);
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_MSN
)
{
username
=
g_base64_decode
((
gchar
*
)
username
,
&
username_len
);
password
=
g_base64_decode
((
gchar
*
)
password
,
&
password_len
);
}
buffer_len
=
stun_usage_turn_create
(
&
cand
->
turn_agent
,
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
),
cand
->
stun_resp_msg
.
buffer
==
NULL
?
NULL
:
&
cand
->
stun_resp_msg
,
STUN_USAGE_TURN_REQUEST_PORT_NORMAL
,
0
,
0
,
(
uint8_t
*
)
cand
->
component
->
turn_username
,
(
size_t
)
strlen
(
cand
->
component
->
turn_username
),
(
uint8_t
*
)
cand
->
component
->
turn_password
,
(
size_t
)
strlen
(
cand
->
component
->
turn_password
),
username
,
username_len
,
password
,
password_len
,
priv_agent_to_turn_compatibility
(
agent
));
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_MSN
)
{
g_free
(
username
);
g_free
(
password
);
}
}
if
(
buffer_len
>
0
)
{
...
...
udp/udp-turn.c
View file @
f163325e
...
...
@@ -260,10 +260,16 @@ nice_udp_turn_create_socket_full (
priv
->
locked
=
FALSE
;
priv
->
udp_socket
=
udp_socket
;
priv
->
username
=
(
uint8_t
*
)
username
;
priv
->
username_len
=
(
size_t
)
strlen
(
username
);
priv
->
password
=
(
uint8_t
*
)
password
;
priv
->
password_len
=
(
size_t
)
strlen
(
password
);
if
(
compatibility
==
NICE_UDP_TURN_SOCKET_COMPATIBILITY_MSN
)
{
priv
->
username
=
g_base64_decode
(
username
,
&
priv
->
username_len
);
priv
->
password
=
g_base64_decode
(
password
,
&
priv
->
password_len
);
}
else
{
priv
->
username
=
(
uint8_t
*
)
g_strdup
(
username
);
priv
->
username_len
=
(
size_t
)
strlen
(
username
);
priv
->
password
=
(
uint8_t
*
)
g_strdup
(
password
);
priv
->
password_len
=
(
size_t
)
strlen
(
password
);
}
priv
->
server_addr
=
*
server_addr
;
priv
->
compatibility
=
compatibility
;
sock
->
addr
=
*
addr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment