Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
88e2ba76
Commit
88e2ba76
authored
Jan 05, 2015
by
johan
Browse files
move srtp from ortp to mediastreamer2
parent
75bfeeba
Changes
4
Hide whitespace changes
Inline
Side-by-side
coreapi/linphonecall.c
View file @
88e2ba76
...
...
@@ -745,7 +745,7 @@ void linphone_call_set_compatible_incoming_call_parameters(LinphoneCall *call, c
call
->
params
->
avpf_rr_interval
=
linphone_core_get_avpf_rr_interval
(
call
->
core
)
*
1000
;
}
}
if
((
sal_media_description_has_srtp
(
md
)
==
TRUE
)
&&
(
m
edia_stream
_srtp_supported
()
==
TRUE
))
{
if
((
sal_media_description_has_srtp
(
md
)
==
TRUE
)
&&
(
m
s
_srtp_supported
()
==
TRUE
))
{
call
->
params
->
media_encryption
=
LinphoneMediaEncryptionSRTP
;
}
}
...
...
@@ -2033,8 +2033,8 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
crypto_idx
=
find_crypto_index_from_tag
(
local_st_desc
->
crypto
,
stream
->
crypto_local_tag
);
if
(
crypto_idx
>=
0
)
{
media_stream_set_srtp_recv_key
(
&
call
->
audiostream
->
ms
,
stream
->
crypto
[
0
].
algo
,
stream
->
crypto
[
0
].
master_key
,
TRUE
);
media_stream_set_srtp_send_key
(
&
call
->
audiostream
->
ms
,
stream
->
crypto
[
0
].
algo
,
local_st_desc
->
crypto
[
crypto_idx
].
master_key
,
TRUE
);
media_stream_set_srtp_recv_key
_b64
(
&
call
->
audiostream
->
ms
,
stream
->
crypto
[
0
].
algo
,
stream
->
crypto
[
0
].
master_key
);
media_stream_set_srtp_send_key
_b64
(
&
call
->
audiostream
->
ms
,
stream
->
crypto
[
0
].
algo
,
local_st_desc
->
crypto
[
crypto_idx
].
master_key
);
}
else
{
ms_warning
(
"Failed to find local crypto algo with tag: %d"
,
stream
->
crypto_local_tag
);
}
...
...
@@ -2155,8 +2155,8 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
if
(
sal_stream_description_has_srtp
(
vstream
)
==
TRUE
)
{
int
crypto_idx
=
find_crypto_index_from_tag
(
local_st_desc
->
crypto
,
vstream
->
crypto_local_tag
);
if
(
crypto_idx
>=
0
)
{
media_stream_set_srtp_recv_key
(
&
call
->
videostream
->
ms
,
vstream
->
crypto
[
0
].
algo
,
vstream
->
crypto
[
0
].
master_key
,
TRUE
);
media_stream_set_srtp_send_key
(
&
call
->
videostream
->
ms
,
vstream
->
crypto
[
0
].
algo
,
local_st_desc
->
crypto
[
crypto_idx
].
master_key
,
TRUE
);
media_stream_set_srtp_recv_key
_b64
(
&
call
->
videostream
->
ms
,
vstream
->
crypto
[
0
].
algo
,
vstream
->
crypto
[
0
].
master_key
);
media_stream_set_srtp_send_key
_b64
(
&
call
->
videostream
->
ms
,
vstream
->
crypto
[
0
].
algo
,
local_st_desc
->
crypto
[
crypto_idx
].
master_key
);
}
}
configure_rtp_session_for_rtcp_xr
(
lc
,
call
,
SalVideo
);
...
...
@@ -2276,9 +2276,9 @@ static bool_t update_stream_crypto_params(LinphoneCall *call, const SalStreamDes
int
crypto_idx
=
find_crypto_index_from_tag
(
local_st_desc
->
crypto
,
new_stream
->
crypto_local_tag
);
if
(
crypto_idx
>=
0
)
{
if
(
call
->
localdesc_changed
&
SAL_MEDIA_DESCRIPTION_CRYPTO_KEYS_CHANGED
)
media_stream_set_srtp_send_key
(
ms
,
new_stream
->
crypto
[
0
].
algo
,
local_st_desc
->
crypto
[
crypto_idx
].
master_key
,
TRUE
);
media_stream_set_srtp_send_key
_b64
(
ms
,
new_stream
->
crypto
[
0
].
algo
,
local_st_desc
->
crypto
[
crypto_idx
].
master_key
);
if
(
strcmp
(
old_stream
->
crypto
[
0
].
master_key
,
new_stream
->
crypto
[
0
].
master_key
)
!=
0
){
media_stream_set_srtp_recv_key
(
ms
,
new_stream
->
crypto
[
0
].
algo
,
new_stream
->
crypto
[
0
].
master_key
,
TRUE
);
media_stream_set_srtp_recv_key
_b64
(
ms
,
new_stream
->
crypto
[
0
].
algo
,
new_stream
->
crypto
[
0
].
master_key
);
}
return
TRUE
;
}
else
{
...
...
coreapi/linphonecore.c
View file @
88e2ba76
...
...
@@ -6825,7 +6825,7 @@ const char *linphone_media_encryption_to_string(LinphoneMediaEncryption menc){
bool_t
linphone_core_media_encryption_supported
(
const
LinphoneCore
*
lc
,
LinphoneMediaEncryption
menc
){
switch
(
menc
){
case
LinphoneMediaEncryptionSRTP
:
return
m
edia_stream
_srtp_supported
();
return
m
s
_srtp_supported
();
case
LinphoneMediaEncryptionZRTP
:
return
ms_zrtp_available
();
case
LinphoneMediaEncryptionNone
:
...
...
@@ -6838,7 +6838,7 @@ int linphone_core_set_media_encryption(LinphoneCore *lc, LinphoneMediaEncryption
const
char
*
type
=
"none"
;
int
ret
=
0
;
if
(
menc
==
LinphoneMediaEncryptionSRTP
){
if
(
!
m
edia_stream
_srtp_supported
()){
if
(
!
m
s
_srtp_supported
()){
ms_warning
(
"SRTP not supported by library."
);
type
=
"none"
;
ret
=-
1
;
...
...
mediastreamer2
@
221583f6
Subproject commit
f07213216893c60359601801b867cd678e916de1
Subproject commit
221583f6a3804940fb16a198d77dea82584840f4
oRTP
@
5e37fa55
Subproject commit
fbe5a32a9a90b0224a6d598c1e060a89f5bd4aba
Subproject commit
5e37fa55f1f15f5896d69156e64cdc95a1ff68bf
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