From 58bf466a676881ff5c4f086bb2ef77a472cc0a00 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Tue, 30 Jun 2015 11:53:31 +0200 Subject: [PATCH] call_tester.c: create user certificates at the right place before using it --- tester/call_tester.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tester/call_tester.c b/tester/call_tester.c index 370427a9c..d16fd8926 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -1795,8 +1795,10 @@ void video_call_base_2(LinphoneCoreManager* pauline,LinphoneCoreManager* marie, } if (mode==LinphoneMediaEncryptionDTLS) { /* for DTLS we must access certificates or at least have a directory to store them */ - marie->lc->user_certificates_path = ms_strdup_printf("%s/certificates/marie", bc_tester_read_dir_prefix); - pauline->lc->user_certificates_path = ms_strdup_printf("%s/certificates/pauline", bc_tester_read_dir_prefix); + marie->lc->user_certificates_path = ms_strdup_printf("%s/certificates-marie", bc_tester_writable_dir_prefix); + pauline->lc->user_certificates_path = ms_strdup_printf("%s/certificates-pauline", bc_tester_writable_dir_prefix); + belle_sip_mkdir(marie->lc->user_certificates_path); + belle_sip_mkdir(pauline->lc->user_certificates_path); } linphone_core_set_media_encryption(marie->lc,mode); @@ -2506,8 +2508,10 @@ void call_base_with_configfile(LinphoneMediaEncryption mode, bool_t enable_video linphone_core_set_media_encryption(marie->lc,mode); linphone_core_set_media_encryption(pauline->lc,mode); if (mode==LinphoneMediaEncryptionDTLS) { /* for DTLS we must access certificates or at least have a directory to store them */ - marie->lc->user_certificates_path = ms_strdup_printf("%s/certificates/marie", bc_tester_read_dir_prefix); - pauline->lc->user_certificates_path = ms_strdup_printf("%s/certificates/pauline", bc_tester_read_dir_prefix); + marie->lc->user_certificates_path = ms_strdup_printf("%s/certificates-marie", bc_tester_writable_dir_prefix); + pauline->lc->user_certificates_path = ms_strdup_printf("%s/certificates-pauline", bc_tester_writable_dir_prefix); + belle_sip_mkdir(marie->lc->user_certificates_path); + belle_sip_mkdir(pauline->lc->user_certificates_path); } linphone_core_set_firewall_policy(marie->lc,policy);