mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 09:49:26 +00:00
Merge branch 'master' of git.linphone.org:linphone
This commit is contained in:
commit
1911e5109c
3 changed files with 33 additions and 12 deletions
|
|
@ -58,8 +58,9 @@ The next pieces need to be compiled manually. To ensure compatibility with multi
|
|||
|
||||
- Install zrtpcpp (optional), for unbreakable call encryption
|
||||
$ sudo port install cmake
|
||||
$ git clone git://git.linphone.org/zrtpcpp.git
|
||||
$ cd zrtpcpp && cmake -Denable-ccrtp=false . && make
|
||||
$ git clone https://github.com/wernerd/ZRTPCPP.git
|
||||
$ cd ZRTPCPP
|
||||
$ cmake -DCORE_LIB=true -DSDES=false . && make
|
||||
$ sudo make install
|
||||
|
||||
|
||||
|
|
@ -82,7 +83,7 @@ The next pieces need to be compiled manually. To ensure compatibility with multi
|
|||
|
||||
Then or otherwise, do:
|
||||
|
||||
$ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp --disable-strict && make
|
||||
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/opt/local --with-readline=/opt/local --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp --disable-strict && make
|
||||
|
||||
Install to /opt/local
|
||||
|
||||
|
|
|
|||
|
|
@ -688,7 +688,8 @@ static void linphone_call_set_terminated(LinphoneCall *call){
|
|||
|
||||
void linphone_call_fix_call_parameters(LinphoneCall *call){
|
||||
call->params.has_video=call->current_params.has_video;
|
||||
call->params.media_encryption=call->current_params.media_encryption;
|
||||
if (call->params.media_encryption != LinphoneMediaEncryptionZRTP) /*in case of ZRTP call parameter are handle after zrtp negociation*/
|
||||
call->params.media_encryption=call->current_params.media_encryption;
|
||||
}
|
||||
|
||||
const char *linphone_call_state_to_string(LinphoneCallState cs){
|
||||
|
|
@ -2770,4 +2771,4 @@ void linphone_call_set_contact_op(LinphoneCall* call) {
|
|||
sal_op_set_contact(call->op, contact);
|
||||
linphone_address_destroy(contact);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -916,19 +916,24 @@ static void simple_conference(void) {
|
|||
}
|
||||
|
||||
|
||||
static void srtp_call(void) {
|
||||
static void encrypted_call(LinphoneMediaEncryption mode) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
|
||||
if (linphone_core_media_encryption_supported(marie->lc,LinphoneMediaEncryptionSRTP)) {
|
||||
linphone_core_set_media_encryption(marie->lc,LinphoneMediaEncryptionSRTP);
|
||||
linphone_core_set_media_encryption(pauline->lc,LinphoneMediaEncryptionSRTP);
|
||||
if (linphone_core_media_encryption_supported(marie->lc,mode)) {
|
||||
linphone_core_set_media_encryption(marie->lc,mode);
|
||||
linphone_core_set_media_encryption(pauline->lc,mode);
|
||||
|
||||
CU_ASSERT_TRUE(call(pauline,marie));
|
||||
|
||||
CU_ASSERT_EQUAL(linphone_core_get_media_encryption(marie->lc),LinphoneMediaEncryptionSRTP);
|
||||
CU_ASSERT_EQUAL(linphone_core_get_media_encryption(pauline->lc),LinphoneMediaEncryptionSRTP);
|
||||
|
||||
CU_ASSERT_EQUAL(linphone_core_get_media_encryption(marie->lc),mode);
|
||||
CU_ASSERT_EQUAL(linphone_core_get_media_encryption(pauline->lc),mode);
|
||||
if (linphone_core_get_media_encryption(pauline->lc) == LinphoneMediaEncryptionZRTP
|
||||
&& linphone_core_get_media_encryption(pauline->lc) == LinphoneMediaEncryptionZRTP) {
|
||||
/*check SAS*/
|
||||
CU_ASSERT_STRING_EQUAL(linphone_call_get_authentication_token(linphone_core_get_current_call(pauline->lc))
|
||||
,linphone_call_get_authentication_token(linphone_core_get_current_call(marie->lc)));
|
||||
}
|
||||
/*just to sleep*/
|
||||
linphone_core_terminate_all_calls(marie->lc);
|
||||
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1));
|
||||
|
|
@ -939,6 +944,16 @@ static void srtp_call(void) {
|
|||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
static void srtp_call(LinphoneMediaEncryptionSRTP) {
|
||||
encrypted_call(LinphoneMediaEncryptionSRTP);
|
||||
}
|
||||
|
||||
/*
|
||||
* futur work
|
||||
static void zrtp_call(LinphoneMediaEncryptionSRTP) {
|
||||
encrypted_call(LinphoneMediaEncryptionZRTP);
|
||||
}*/
|
||||
|
||||
static void call_with_declined_srtp(void) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
|
|
@ -1007,6 +1022,9 @@ static void srtp_ice_call(void) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void early_media_call(void) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_early_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
|
|
@ -1476,6 +1494,7 @@ test_t call_tests[] = {
|
|||
{ "Call paused resumed", call_paused_resumed },
|
||||
{ "Call paused resumed from callee", call_paused_resumed_from_callee },
|
||||
{ "SRTP call", srtp_call },
|
||||
/*{ "ZRTP call",zrtp_call}, futur work*/
|
||||
{ "SRTP call with declined srtp", call_with_declined_srtp },
|
||||
#ifdef VIDEO_ENABLED
|
||||
{ "Simple video call",video_call},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue