diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 28fd77526..e182d625c 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -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 { diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index a90b25162..d74631359 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -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; diff --git a/mediastreamer2 b/mediastreamer2 index f07213216..221583f6a 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit f07213216893c60359601801b867cd678e916de1 +Subproject commit 221583f6a3804940fb16a198d77dea82584840f4 diff --git a/oRTP b/oRTP index fbe5a32a9..5e37fa55f 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit fbe5a32a9a90b0224a6d598c1e060a89f5bd4aba +Subproject commit 5e37fa55f1f15f5896d69156e64cdc95a1ff68bf