mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Added JNI wrapper for linphone_core_set_root_ca_data
This commit is contained in:
parent
2af5925e6f
commit
39ee572c94
4 changed files with 28 additions and 0 deletions
|
|
@ -4939,6 +4939,14 @@ void linphone_core_set_root_ca(LinphoneCore *lc, const char *path) {
|
|||
lp_config_set_string(lc->config,"sip", "root_ca", path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the trusted root CAs (PEM format)
|
||||
*
|
||||
* @param path
|
||||
* @param lc The LinphoneCore object
|
||||
*
|
||||
* @ingroup initializing
|
||||
**/
|
||||
void linphone_core_set_root_ca_data(LinphoneCore *lc, const char *data) {
|
||||
sal_set_root_ca(lc->sal, NULL);
|
||||
sal_set_root_ca_data(lc->sal, data);
|
||||
|
|
|
|||
|
|
@ -2437,6 +2437,14 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setRootCA(JNIEnv* env
|
|||
linphone_core_set_root_ca((LinphoneCore*)lc,path);
|
||||
ReleaseStringUTFChars(env, jpath, path);
|
||||
}
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setRootCAData(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
,jstring jdata) {
|
||||
const char* data = GetStringUTFChars(env, jdata);
|
||||
linphone_core_set_root_ca_data((LinphoneCore*)lc, data);
|
||||
ReleaseStringUTFChars(env, jdata, data);
|
||||
}
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setRingback(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
|
|
|
|||
|
|
@ -1306,6 +1306,13 @@ public interface LinphoneCore {
|
|||
*/
|
||||
void setRootCA(String path);
|
||||
|
||||
/**
|
||||
* Sets trusted root CAs
|
||||
*
|
||||
* @param data String with multiple PEM certif
|
||||
*/
|
||||
void setRootCAData(String data);
|
||||
|
||||
/**
|
||||
* Sets the path to a wav file used for for ringing back.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native void setRing(long nativePtr, String path);
|
||||
private native String getRing(long nativePtr);
|
||||
private native void setRootCA(long nativePtr, String path);
|
||||
private native void setRootCAData(long nativePtr, String data);
|
||||
private native void setRingback(long nativePtr, String path);
|
||||
private native long[] listVideoPayloadTypes(long nativePtr);
|
||||
private native void setVideoCodecs(long nativePtr, long[] codecs);
|
||||
|
|
@ -625,6 +626,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
setRootCA(nativePtr, path);
|
||||
}
|
||||
|
||||
public synchronized void setRootCAData(String data) {
|
||||
setRootCAData(nativePtr, data);
|
||||
}
|
||||
|
||||
public synchronized void setRingback(String path) {
|
||||
setRingback(nativePtr, path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue