Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions java/src/main/java/org/wildfly/openssl/SSL.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ static void init() {
System.loadLibrary("wfssl");
instance = new SSLImpl();
} catch (Throwable e) {
//Log the initial failure to provide a clear root cause.
logger.log(Level.FINE, "Failed to load wfssl native library from system path. Falling back to classpath.", e);
//try using out pre-packaged version
LibraryClassLoader libCl = new LibraryClassLoader(SSL.class.getClassLoader());
try {
Expand All @@ -89,8 +91,12 @@ static void init() {
}
}
} else {
Runtime.getRuntime().load(libPath);
instance = new SSLImpl();
try {
Runtime.getRuntime().load(libPath);
instance = new SSLImpl();
} catch (Throwable t) {
throw new IllegalStateException("Failed to load wfssl native library from specified path: " + libPath, t);
}
}
String specifiedPath = System.getProperty(ORG_WILDFLY_OPENSSL_PATH);

Expand Down