diff options
author | Arne Schwabe <arne@rfc2549.org> | 2021-12-16 16:51:27 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2021-12-17 11:36:32 +0100 |
commit | 4466103d770c353cfb8d4ea08093560ba28d58b8 (patch) | |
tree | c796c52bccbd70ddf585239b5850837f5209c3e5 /main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java | |
parent | aa222c82c1bb3243817b74f6efce7cbc9676b4bc (diff) |
Update OpenVPN and add support for the new xkey infrastructure in OpenVPN
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Diffstat (limited to 'main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java b/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java index ecfa86ff..470ec6d6 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java +++ b/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java @@ -17,8 +17,7 @@ public class NativeUtils { static native void jniclose(int fdint); - public static String getNativeAPI() - { + public static String getNativeAPI() { if (isRoboUnitTest()) return "ROBO"; else @@ -31,6 +30,20 @@ public class NativeUtils { public static native String getOpenVPN3GitVersion(); + static boolean rsspssloaded = false; + + public static byte[] addRssPssPadding(int hashtype, int MSBits, int rsa_size, byte[] from) + { + if (!rsspssloaded) { + rsspssloaded = true; + System.loadLibrary("rsapss"); + } + + return rsapss(hashtype, MSBits, rsa_size, from); + } + + private static native byte[] rsapss(int hashtype, int MSBits, int rsa_size, byte[] from); + public final static int[] openSSLlengths = { 16, 64, 256, 1024, 1500, 8 * 1024, 16 * 1024 }; @@ -43,6 +56,7 @@ public class NativeUtils { if (Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN) System.loadLibrary("jbcrypto"); + if (!BuildConfig.FLAVOR.equals("skeleton")) { System.loadLibrary("osslspeedtest"); } |