mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
configure cert path for dtls
This commit is contained in:
parent
e142a42d6b
commit
f5e0bc58de
2 changed files with 12 additions and 9 deletions
|
|
@ -1484,11 +1484,7 @@ static void misc_config_read(LinphoneCore *lc) {
|
|||
}else if (strcmp(uuid,"0")!=0) /*to allow to disable sip.instance*/
|
||||
sal_set_uuid(lc->sal, uuid);
|
||||
|
||||
/* DTLS: if media_encryption DTLS SRTP is available, get or create the certificate directory */
|
||||
/*if (ms_dtls_srtp_available()){
|
||||
*//*JOHAN: USELESS? REMOVE IT*/
|
||||
//const char *user_certificate_config_path = lp_config_get_string(config,"misc","uuid",);
|
||||
// }*/
|
||||
lc->user_certificates_path=ms_strdup(lp_config_get_string(config,"misc","user_certificates_path","."));
|
||||
}
|
||||
|
||||
static void linphone_core_start(LinphoneCore * lc) {
|
||||
|
|
@ -1617,6 +1613,7 @@ static void linphone_core_init(LinphoneCore * lc, const LinphoneCoreVTable *vtab
|
|||
lc->data=userdata;
|
||||
lc->ringstream_autorelease=TRUE;
|
||||
|
||||
|
||||
memcpy(local_vtable,vtable,sizeof(LinphoneCoreVTable));
|
||||
lc->vtables=ms_list_append(lc->vtables,local_vtable);
|
||||
|
||||
|
|
@ -6760,10 +6757,11 @@ const char *linphone_core_get_zrtp_secrets_file(LinphoneCore *lc){
|
|||
}
|
||||
|
||||
void linphone_core_set_user_certificates_path(LinphoneCore *lc, const char* path){
|
||||
if (lc->user_certificates_path != NULL) {
|
||||
ms_free(lc->user_certificates_path);
|
||||
}
|
||||
lc->user_certificates_path = path ? ms_strdup(path) : NULL;
|
||||
char* new_value;
|
||||
new_value = path?ms_strdup(path):NULL;
|
||||
if (lc->user_certificates_path) ms_free(lc->user_certificates_path);
|
||||
lp_config_set_string(lc->config,"misc","user_certificates_path",lc->user_certificates_path=new_value);
|
||||
return ;
|
||||
}
|
||||
|
||||
const char *linphone_core_get_user_certificates_path(LinphoneCore *lc){
|
||||
|
|
|
|||
|
|
@ -1584,6 +1584,11 @@ static void video_call_base(LinphoneCoreManager* pauline,LinphoneCoreManager* ma
|
|||
linphone_core_set_video_policy(pauline->lc,&pauline_policy);
|
||||
}
|
||||
|
||||
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", liblinphone_tester_file_prefix);
|
||||
pauline->lc->user_certificates_path = ms_strdup_printf("%s/certificates/pauline", liblinphone_tester_file_prefix);
|
||||
}
|
||||
|
||||
linphone_core_set_media_encryption(marie->lc,mode);
|
||||
linphone_core_set_media_encryption(pauline->lc,mode);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue