mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-01 10:49:26 +00:00
Added JNI wrapper for linphone_core_verify_server_certificates and linphone_core_verify_server_cn
This commit is contained in:
parent
71a43ebb4f
commit
1f87c8066d
3 changed files with 32 additions and 0 deletions
|
|
@ -8556,6 +8556,14 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setTlsKeyPath(JNIEnv *en
|
|||
ReleaseStringUTFChars(env, jpath, path);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVerifyServerCertificates(JNIEnv *env, jobject, jlong lc, jboolean enabled) {
|
||||
linphone_core_verify_server_certificates((LinphoneCore*)lc, enabled);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVerifyServerCN(JNIEnv *env, jobject, jlong lc, jboolean enabled) {
|
||||
linphone_core_verify_server_cn((LinphoneCore*)lc, enabled);
|
||||
}
|
||||
|
||||
extern "C" jstring Java_org_linphone_core_LinphoneCoreImpl_getTlsCertificate(JNIEnv *env , jobject, jlong lc) {
|
||||
const char* cert = linphone_core_get_tls_cert((LinphoneCore*)lc);
|
||||
if (cert) {
|
||||
|
|
|
|||
|
|
@ -2491,6 +2491,18 @@ public interface LinphoneCore {
|
|||
*/
|
||||
public void setTlsKeyPath(String path);
|
||||
|
||||
/**
|
||||
* Specify whether the tls server certificate must be verified when connecting to a SIP/TLS server.
|
||||
* @param enable A boolean value telling whether the tls server certificate must be verified
|
||||
*/
|
||||
public void setVerifyServerCertificates(boolean enable);
|
||||
|
||||
/**
|
||||
* Specify whether the tls server certificate common name must be verified when connecting to a SIP/TLS server.
|
||||
* @param enable A boolean value telling whether the tls server certificate common name must be verified
|
||||
*/
|
||||
public void setVerifyServerCN(boolean enable);
|
||||
|
||||
/**
|
||||
* Enable or not openh264
|
||||
* @param enable
|
||||
|
|
|
|||
|
|
@ -1785,6 +1785,18 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
setTlsKeyPath(nativePtr, path);
|
||||
}
|
||||
|
||||
private native void setVerifyServerCertificates(long ptr, boolean enable);
|
||||
@Override
|
||||
public void setVerifyServerCertificates(boolean enable) {
|
||||
setVerifyServerCertificates(nativePtr, enable);
|
||||
}
|
||||
|
||||
private native void setVerifyServerCN(long ptr, boolean enable);
|
||||
@Override
|
||||
public void setVerifyServerCN(boolean enable) {
|
||||
setVerifyServerCN(nativePtr, enable);
|
||||
}
|
||||
|
||||
public void enableOpenH264(boolean enable) {
|
||||
openh264Enabled = enable;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue