This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git
The following commit(s) were added to refs/heads/master by this push:
new 57b16ad1 Library names and property documentation
57b16ad1 is described below
commit 57b16ad1a1669c407fe14345818d1b4965f8adb9
Author: Sebb <[email protected]>
AuthorDate: Tue Nov 21 00:12:54 2023 +0000
Library names and property documentation
[skip ci]
---
BUILDING.txt | 3 +++
LIBRARY_NAMES.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++
pom.xml | 7 +++----
3 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/BUILDING.txt b/BUILDING.txt
index 0cc1bdda..abd1b1ab 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -96,6 +96,9 @@ Maven build goals:
* Deploy JAR to Maven repo : mvn deploy
* Change version : mvn versions:set -DnewVersion=NEWVERSION
+Note: when running tests, you may need to override the default SSL library
locations/names
+See the file LIBRARY_NAMES.txt for details
+
----------------------------------------------------------------------------------
Importing projects to eclipse
diff --git a/LIBRARY_NAMES.txt b/LIBRARY_NAMES.txt
new file mode 100644
index 00000000..4f5652e1
--- /dev/null
+++ b/LIBRARY_NAMES.txt
@@ -0,0 +1,45 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+Notes on Library names
+======================
+
+If the default SSL Cryptography library is not suitable for use, it may be
+necessary to override the path or name.
+
+The way to do this depends on the OS.
+
+On Linux/macOS, each library version is generally installed in a separate
directory.
+The following properties can be used to override the JNI and JNA locations
respectively:
+jni.library.path
+jna.library.path
+
+On Windows, multiple library versions may be installed in the system directory
under a different name.
+The following properties can be used to override the JNI and JNA file names
respectively:
+jni.library.path
+commons.crypto.OpenSslNativeJna
+
+For testing with Maven, these properties can be defined on the command-line:
+
+Linux/macOs:
+$ mvn ... -Djni.library.path=/usr/local/lib -Djna.library.path=/usr/local/lib
...
+
+Windows:
+
+> mvn ... -D"jni.library.name=libcrypto-1_1-x64"
-D"commons.crypto.OpenSslNativeJna=libcrypto-1_1-x64" ...
+
+
diff --git a/pom.xml b/pom.xml
index 1982bc26..e66b96b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,13 +79,9 @@ The following provides more details on the included
cryptographic software:
mvn -q exec:java -Dexec.mainClass=org.apache.commons.crypto.Crypto
- run a basic JNI test
- -Djni.library.path=override default JNI library path (system dependent)
- -Djni.library.name=override default JNI library name (libcrypto)
mvn -q exec:java -Dexec.mainClass=org.apache.commons.crypto.jna.OpenSslJna
- run a basic JNA test
- -Djna.library.path=override default JNA library path (system dependent)
- -Dcommons.crypto.OpenSslNativeJna=override default library name
Running examples (these are under the test tree, so need test scope):
mvn -q -Dexec.classpathScope=test
-Dexec.mainClass=org.apache.commons.crypto.examples.CLASSNAME
@@ -94,6 +90,9 @@ The following provides more details on the included
cryptographic software:
Additional options
-Djna.debug_load - debug JNA loading
-Dcommons.crypto.debug - add some Commons Crypto debugging
+
+ See LIBRARY_NAMES.txt for details of SSL Cryptographic library overrides
+
-->
<inceptionYear>2016</inceptionYear>