summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/blinkt/openvpn/core')
-rw-r--r--src/de/blinkt/openvpn/core/NativeUtils.java12
-rw-r--r--src/de/blinkt/openvpn/core/OpenVpnManagementThread.java7
2 files changed, 13 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/core/NativeUtils.java b/src/de/blinkt/openvpn/core/NativeUtils.java
new file mode 100644
index 00000000..42d0b583
--- /dev/null
+++ b/src/de/blinkt/openvpn/core/NativeUtils.java
@@ -0,0 +1,12 @@
+package de.blinkt.openvpn.core;
+
+import java.security.InvalidKeyException;
+
+public class NativeUtils {
+ public static native byte[] rsasign(byte[] input,int pkey) throws InvalidKeyException;
+ static native void jniclose(int fdint);
+
+ static {
+ System.loadLibrary("opvpnutil");
+ }
+}
diff --git a/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java
index a44f744e..5b465973 100644
--- a/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java
+++ b/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java
@@ -35,8 +35,6 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNMangement {
private static Vector<OpenVpnManagementThread> active=new Vector<OpenVpnManagementThread>();
- static private native void jniclose(int fdint);
-
public OpenVpnManagementThread(VpnProfile profile, LocalServerSocket mgmtsocket, OpenVpnService openVpnService) {
mProfile = profile;
mServerSocket = mgmtsocket;
@@ -128,7 +126,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNMangement {
//ParcelFileDescriptor pfd = ParcelFileDescriptor.fromFd(fdint);
//pfd.close();
- jniclose(fdint);
+ NativeUtils.jniclose(fdint);
return;
} catch (NoSuchMethodException e) {
exp =e;
@@ -426,9 +424,6 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNMangement {
private void proccessPWFailed(String needed, String args) {
OpenVPN.updateStateString("AUTH_FAILED", needed + args,R.string.state_auth_failed,ConnectionStatus.LEVEL_AUTH_FAILED);
}
- private void logStatusMessage(String command) {
- OpenVPN.logMessage(0,"MGMT:", command);
- }
private static boolean stopOpenVPN() {