This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 7317ab061b Add separate load library for OpenSSL testing
7317ab061b is described below
commit 7317ab061b3e9a3801f30ea4bd89b57145fcd33f
Author: remm <[email protected]>
AuthorDate: Fri Dec 6 11:41:01 2024 +0100
Add separate load library for OpenSSL testing
---
java/org/apache/tomcat/util/openssl/openssl_h.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/java/org/apache/tomcat/util/openssl/openssl_h.java
b/java/org/apache/tomcat/util/openssl/openssl_h.java
index c05333b953..60996db9ca 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h.java
@@ -35,8 +35,10 @@ public class openssl_h {
/*
* On Mac OS SymbolLookup.libraryLookup() appears to ignore
java.library.path which means the LibreSSL
* library will be found which will then fail. Therefore, skip that lookup
on Mac OS.
+ * On other platforms this can also be used to give more flexibility when
testing.
*/
public static final boolean USE_SYSTEM_LOAD_LIBRARY =
Boolean.getBoolean("org.apache.tomcat.util.openssl.USE_SYSTEM_LOAD_LIBRARY");
+ public static final String CRYPTO_LIBRARY_NAME =
System.getProperty("org.apache.tomcat.util.openssl.CRYPTO_LIBRARY_NAME");
public static final String LIBRARY_NAME =
System.getProperty("org.apache.tomcat.util.openssl.LIBRARY_NAME",
(JrePlatform.IS_MAC_OS) ? "ssl.48" : "ssl");
@@ -61,6 +63,9 @@ public class openssl_h {
static final SymbolLookup SYMBOL_LOOKUP;
static {
if (USE_SYSTEM_LOAD_LIBRARY) {
+ if (CRYPTO_LIBRARY_NAME != null) {
+ System.loadLibrary(CRYPTO_LIBRARY_NAME);
+ }
System.loadLibrary(LIBRARY_NAME);
SYMBOL_LOOKUP =
SymbolLookup.loaderLookup().or(Linker.nativeLinker().defaultLookup());
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]