From 1bf1ee2aba2863767f3d85a9d3ebcff8b7b0638e Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 21 Nov 2013 15:53:35 +0100 Subject: [PATCH] rename cacert.pem to cafile.pem to be consistent with flexisip usage --- .../certificates/altname/{cacert.pem => cafile.pem} | 0 tester/certificates/cn/{cacert.pem => cafile.pem} | 0 tester/liblinphone_tester.c | 12 ++++++++---- tester/register_tester.c | 6 +++--- tester/tester_hosts | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) rename tester/certificates/altname/{cacert.pem => cafile.pem} (100%) rename tester/certificates/cn/{cacert.pem => cafile.pem} (100%) diff --git a/tester/certificates/altname/cacert.pem b/tester/certificates/altname/cafile.pem similarity index 100% rename from tester/certificates/altname/cacert.pem rename to tester/certificates/altname/cafile.pem diff --git a/tester/certificates/cn/cacert.pem b/tester/certificates/cn/cafile.pem similarity index 100% rename from tester/certificates/cn/cacert.pem rename to tester/certificates/cn/cafile.pem diff --git a/tester/liblinphone_tester.c b/tester/liblinphone_tester.c index 6be3bd70b..a240bb3f6 100644 --- a/tester/liblinphone_tester.c +++ b/tester/liblinphone_tester.c @@ -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_LinphoneRegistrationOkstat.number_of_LinphoneRegistrationOk2?(proxy_count-2)*10:0))) { linphone_core_iterate(mgr->lc); ms_usleep(100000); } diff --git a/tester/register_tester.c b/tester/register_tester.c index adf3197a8..9531c1447 100644 --- a/tester/register_tester.c +++ b/tester/register_tester.c @@ -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)); diff --git a/tester/tester_hosts b/tester/tester_hosts index b7056b863..de1edc48c 100644 --- a/tester/tester_hosts +++ b/tester/tester_hosts @@ -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