mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
rename cacert.pem to cafile.pem to be consistent with flexisip usage
This commit is contained in:
parent
c45e8dfbef
commit
1bf1ee2aba
5 changed files with 12 additions and 8 deletions
|
|
@ -108,9 +108,9 @@ static LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char*
|
|||
|
||||
sal_enable_test_features(lc->sal,TRUE);
|
||||
#ifndef ANDROID
|
||||
snprintf(rootcapath, sizeof(rootcapath), "%s/certificates/cn/cacert.pem", path);
|
||||
snprintf(rootcapath, sizeof(rootcapath), "%s/certificates/cn/cafile.pem", path);
|
||||
#else
|
||||
snprintf(rootcapath, sizeof(rootcapath), "%s/cacert.pem", path);
|
||||
snprintf(rootcapath, sizeof(rootcapath), "%s/cafile.pem", path);
|
||||
#endif
|
||||
linphone_core_set_root_ca(lc,rootcapath);
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ LinphoneCoreManager *get_manager(LinphoneCore *lc){
|
|||
LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_for_proxies) {
|
||||
LinphoneCoreManager* mgr= ms_new0(LinphoneCoreManager,1);
|
||||
LinphoneProxyConfig* proxy;
|
||||
int proxy_count=check_for_proxies?(rc_file?1:0):0;
|
||||
int proxy_count;
|
||||
int retry=0;
|
||||
|
||||
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
|
|||
linphone_core_set_user_data(mgr->lc,mgr);
|
||||
reset_counters(&mgr->stat);
|
||||
/*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);
|
||||
ms_usleep(100000);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ static void tls_certificate_failure(){
|
|||
linphone_core_set_root_ca(mgr->lc,NULL); /*no root ca*/
|
||||
linphone_core_refresh_registers(mgr->lc);
|
||||
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_refresh_registers(mgr->lc);
|
||||
CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationOk,1));
|
||||
|
|
@ -575,7 +575,7 @@ static void tls_alt_name_register(){
|
|||
|
||||
mgr=linphone_core_manager_new2("pauline_alt_rc",FALSE);
|
||||
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_refresh_registers(mgr->lc);
|
||||
CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationOk,1));
|
||||
|
|
@ -590,7 +590,7 @@ static void tls_wildcard_register(){
|
|||
|
||||
mgr=linphone_core_manager_new2("pauline_wild_rc",FALSE);
|
||||
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_refresh_registers(mgr->lc);
|
||||
CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationOk,2));
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue