mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
move srtp from ortp to mediastreamer2
This commit is contained in:
parent
75bfeeba88
commit
88e2ba7625
4 changed files with 11 additions and 11 deletions
|
|
@ -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) && (media_stream_srtp_supported() == TRUE)) {
|
||||
if ((sal_media_description_has_srtp(md) == TRUE) && (ms_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 {
|
||||
|
|
|
|||
|
|
@ -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 media_stream_srtp_supported();
|
||||
return ms_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 (!media_stream_srtp_supported()){
|
||||
if (!ms_srtp_supported()){
|
||||
ms_warning("SRTP not supported by library.");
|
||||
type="none";
|
||||
ret=-1;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit f07213216893c60359601801b867cd678e916de1
|
||||
Subproject commit 221583f6a3804940fb16a198d77dea82584840f4
|
||||
2
oRTP
2
oRTP
|
|
@ -1 +1 @@
|
|||
Subproject commit fbe5a32a9a90b0224a6d598c1e060a89f5bd4aba
|
||||
Subproject commit 5e37fa55f1f15f5896d69156e64cdc95a1ff68bf
|
||||
Loading…
Add table
Reference in a new issue