Commit 1bf1ee2a authored by jehan's avatar jehan

rename cacert.pem to cafile.pem to be consistent with flexisip usage

parent c45e8dfb
...@@ -108,9 +108,9 @@ static LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char* ...@@ -108,9 +108,9 @@ static LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char*
sal_enable_test_features(lc->sal,TRUE); sal_enable_test_features(lc->sal,TRUE);
#ifndef ANDROID #ifndef ANDROID
snprintf(rootcapath, sizeof(rootcapath), "%s/certificates/cn/cacert.pem", path); snprintf(rootcapath, sizeof(rootcapath), "%s/certificates/cn/cafile.pem", path);
#else #else
snprintf(rootcapath, sizeof(rootcapath), "%s/cacert.pem", path); snprintf(rootcapath, sizeof(rootcapath), "%s/cafile.pem", path);
#endif #endif
linphone_core_set_root_ca(lc,rootcapath); linphone_core_set_root_ca(lc,rootcapath);
...@@ -182,7 +182,7 @@ LinphoneCoreManager *get_manager(LinphoneCore *lc){ ...@@ -182,7 +182,7 @@ LinphoneCoreManager *get_manager(LinphoneCore *lc){
LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_for_proxies) { LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_for_proxies) {
LinphoneCoreManager* mgr= ms_new0(LinphoneCoreManager,1); LinphoneCoreManager* mgr= ms_new0(LinphoneCoreManager,1);
LinphoneProxyConfig* proxy; LinphoneProxyConfig* proxy;
int proxy_count=check_for_proxies?(rc_file?1:0):0; int proxy_count;
int retry=0; int retry=0;
mgr->v_table.registration_state_changed=registration_state_changed; mgr->v_table.registration_state_changed=registration_state_changed;
...@@ -201,8 +201,12 @@ LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_f ...@@ -201,8 +201,12 @@ LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_f
linphone_core_set_user_data(mgr->lc,mgr); linphone_core_set_user_data(mgr->lc,mgr);
reset_counters(&mgr->stat); reset_counters(&mgr->stat);
/*CU_ASSERT_EQUAL(ms_list_size(linphone_core_get_proxy_config_list(lc)),proxy_count);*/ /*CU_ASSERT_EQUAL(ms_list_size(linphone_core_get_proxy_config_list(lc)),proxy_count);*/
if (check_for_proxies && rc_file) /**/
proxy_count=ms_list_size(linphone_core_get_proxy_config_list(mgr->lc));
else
proxy_count=0;
while (mgr->stat.number_of_LinphoneRegistrationOk<proxy_count && retry++ <20) { while (mgr->stat.number_of_LinphoneRegistrationOk<proxy_count && retry++ <(20+ (proxy_count>2?(proxy_count-2)*10:0))) {
linphone_core_iterate(mgr->lc); linphone_core_iterate(mgr->lc);
ms_usleep(100000); ms_usleep(100000);
} }
......
...@@ -537,7 +537,7 @@ static void tls_certificate_failure(){ ...@@ -537,7 +537,7 @@ static void tls_certificate_failure(){
linphone_core_set_root_ca(mgr->lc,NULL); /*no root ca*/ linphone_core_set_root_ca(mgr->lc,NULL); /*no root ca*/
linphone_core_refresh_registers(mgr->lc); linphone_core_refresh_registers(mgr->lc);
CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationFailed,2)); CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationFailed,2));
snprintf(rootcapath,sizeof(rootcapath), "%s/certificates/cn/cacert.pem", liblinphone_tester_file_prefix); /*goot root ca*/ snprintf(rootcapath,sizeof(rootcapath), "%s/certificates/cn/cafile.pem", liblinphone_tester_file_prefix); /*goot root ca*/
linphone_core_set_root_ca(mgr->lc,rootcapath); linphone_core_set_root_ca(mgr->lc,rootcapath);
linphone_core_refresh_registers(mgr->lc); linphone_core_refresh_registers(mgr->lc);
CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationOk,1)); CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationOk,1));
...@@ -575,7 +575,7 @@ static void tls_alt_name_register(){ ...@@ -575,7 +575,7 @@ static void tls_alt_name_register(){
mgr=linphone_core_manager_new2("pauline_alt_rc",FALSE); mgr=linphone_core_manager_new2("pauline_alt_rc",FALSE);
lc=mgr->lc; lc=mgr->lc;
snprintf(rootcapath,sizeof(rootcapath), "%s/certificates/cn/cacert.pem", liblinphone_tester_file_prefix); snprintf(rootcapath,sizeof(rootcapath), "%s/certificates/cn/cafile.pem", liblinphone_tester_file_prefix);
linphone_core_set_root_ca(mgr->lc,rootcapath); linphone_core_set_root_ca(mgr->lc,rootcapath);
linphone_core_refresh_registers(mgr->lc); linphone_core_refresh_registers(mgr->lc);
CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationOk,1)); CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationOk,1));
...@@ -590,7 +590,7 @@ static void tls_wildcard_register(){ ...@@ -590,7 +590,7 @@ static void tls_wildcard_register(){
mgr=linphone_core_manager_new2("pauline_wild_rc",FALSE); mgr=linphone_core_manager_new2("pauline_wild_rc",FALSE);
lc=mgr->lc; lc=mgr->lc;
snprintf(rootcapath,sizeof(rootcapath), "%s/certificates/cn/cacert.pem", liblinphone_tester_file_prefix); snprintf(rootcapath,sizeof(rootcapath), "%s/certificates/cn/cafile.pem", liblinphone_tester_file_prefix);
linphone_core_set_root_ca(mgr->lc,rootcapath); linphone_core_set_root_ca(mgr->lc,rootcapath);
linphone_core_refresh_registers(mgr->lc); linphone_core_refresh_registers(mgr->lc);
CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationOk,2)); CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationOk,2));
......
94.23.19.176 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org 127.0.0.1 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment