private static boolean initializeTcNative(String engine) throws Exception { return Library.initialize("provided", engine); }
/** * Setup native library. This is the first method that must be called! * * @param libraryName the name of the library to load * @param engine Support for external a Crypto Device ("engine"), usually * @return {@code true} if initialization was successful * @throws Exception if an error happens during initialization */ public static boolean initialize(String libraryName, String engine) throws Exception { if (_instance == null) { _instance = libraryName == null ? new Library() : new Library(libraryName); if (aprMajorVersion() < 1) { throw new UnsatisfiedLinkError("Unsupported APR Version (" + aprVersionString() + ")"); } if (!aprHasThreads()) { throw new UnsatisfiedLinkError("Missing APR_HAS_THREADS"); } } return initialize0() && SSL.initialize(engine) == 0; } }
private Library(String libraryName) { if (!PROVIDED.equals(libraryName)) { loadLibrary(libraryName); } }
private static void loadLibrary(String libraryName) { System.loadLibrary(calculatePackagePrefix().replace('.', '_') + libraryName); }
/** * Setup native library. This is the first method that must be called! * * @param libraryName the name of the library to load * @param engine Support for external a Crypto Device ("engine"), usually * @return {@code true} if initialization was successful * @throws Exception if an error happens during initialization */ public static boolean initialize(String libraryName, String engine) throws Exception { if (_instance == null) { _instance = libraryName == null ? new Library() : new Library(libraryName); if (aprMajorVersion() < 1) { throw new UnsatisfiedLinkError("Unsupported APR Version (" + aprVersionString() + ")"); } if (!aprHasThreads()) { throw new UnsatisfiedLinkError("Missing APR_HAS_THREADS"); } } return initialize0() && SSL.initialize(engine) == 0; } }
private Library(String libraryName) { if (!PROVIDED.equals(libraryName)) { loadLibrary(libraryName); } }
private static void loadLibrary(String libraryName) { System.loadLibrary(calculatePackagePrefix().replace('.', '_') + libraryName); }
private static boolean initializeTcNative(String engine) throws Exception { return Library.initialize("provided", engine); }
for (int i = 0; i < NAMES.length; i++) { try { loadLibrary(NAMES[i]); loaded = true; } catch (ThreadDeath t) {
private static boolean initializeTcNative(String engine) throws Exception { return Library.initialize("provided", engine); }
for (int i = 0; i < NAMES.length; i++) { try { loadLibrary(NAMES[i]); loaded = true; } catch (ThreadDeath t) {
private static boolean initializeTcNative() throws Exception { return Library.initialize(); }
/** * Calls {@link #initialize(String, String)} with {@code "provided"} and {@code null}. * * @return {@code true} if initialization was successful * @throws Exception if an error happens during initialization */ public static boolean initialize() throws Exception { return initialize(PROVIDED, null); }
/** * Calls {@link #initialize(String, String)} with {@code "provided"} and {@code null}. * * @return {@code true} if initialization was successful * @throws Exception if an error happens during initialization */ public static boolean initialize() throws Exception { return initialize(PROVIDED, null); }
private static boolean initializeTcNative(String engine) throws Exception { return Library.initialize("provided", engine); }
private static boolean initializeTcNative() throws Exception { return Library.initialize(); }