add java method to configure user certificates

This commit is contained in:
Simon Morlat 2016-02-10 17:00:22 +01:00
parent 2ccfd093d3
commit 2c929a08c7
3 changed files with 16 additions and 0 deletions

View file

@ -6864,3 +6864,9 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setMediaNetworkRe
linphone_core_set_media_network_reachable((LinphoneCore*)pcore, (bool_t) reachable);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setUserCertificatesPath(JNIEnv *env, jobject jobj, jlong pcore, jstring jpath){
const char *path = jpath ? env->GetStringUTFChars(jpath, NULL) : NULL;
linphone_core_set_user_certificates_path((LinphoneCore*)pcore, path);
if (path) env->ReleaseStringUTFChars(jpath, path);
}

View file

@ -2280,4 +2280,8 @@ public interface LinphoneCore {
**/
public void setDnsServers(String servers[]);
/**
* Set user certificates directory path (used by SRTP-DTLS).
*/
public void setUserCertificatesPath(String path);
}

View file

@ -1630,4 +1630,10 @@ class LinphoneCoreImpl implements LinphoneCore {
public void setDnsServers(String servers[]){
setDnsServers(nativePtr, servers);
}
private native void setUserCertificatesPath(long nativePtr, String path);
@Override
public void setUserCertificatesPath(String path) {
setUserCertificatesPath(nativePtr, path);
}
}