diff options
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 | 22 |
1 files changed, 16 insertions, 6 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 72b2b784..9bfa5e67 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java +++ b/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java @@ -30,18 +30,28 @@ public class NativeUtils { public static native String getOpenVPN3GitVersion(); - static boolean rsspssloaded = false; + private static native String getOpenSSLVersionString(); + + public static String getOpenSSLVersion() { + loadOsslUtil(); + return getOpenSSLVersionString(); + } + + static boolean osslutilloaded = false; public static byte[] addRssPssPadding(int hashtype, int MSBits, int rsa_size, byte[] from) { - if (!rsspssloaded) { - rsspssloaded = true; - System.loadLibrary("rsapss"); - } - + loadOsslUtil(); return rsapss(hashtype, MSBits, rsa_size, from); } + private static void loadOsslUtil() { + if (!osslutilloaded) { + osslutilloaded = true; + System.loadLibrary("osslutil"); + } + } + private static native byte[] rsapss(int hashtype, int MSBits, int rsa_size, byte[] from); public final static int[] openSSLlengths = { |