wolfCrypt JNI wrapper and JCE provider
 
 
 
 
Go to file
Chris Conlon f227a09c75 JNI: fix native exception handling in DH 2017-04-28 18:04:53 -06:00
jni JNI: fix native exception handling in DH 2017-04-28 18:04:53 -06:00
src JNI: fix for DH state check when loading private/public keys 2017-04-27 16:39:36 -06:00
AUTHORS move wolfcrypt-jni back into directory of same name 2015-04-01 14:56:40 -06:00
COPYING move wolfcrypt-jni back into directory of same name 2015-04-01 14:56:40 -06:00
LICENSING move wolfcrypt-jni back into directory of same name 2015-04-01 14:56:40 -06:00
README.md JNI: add code signing functionality 2017-03-24 17:15:31 -06:00
build.xml add wolfjce.debug system property for JCE debug logging 2017-04-27 15:46:42 -06:00
makefile removes forced HAVE_FIPS from makefile 2017-03-24 17:13:04 -03:00
makefile.linux JNI: remove HAVE_FIPS from Linux and OSX makefiles 2017-03-24 16:12:18 -06:00
makefile.macosx JNI: remove HAVE_FIPS from Linux and OSX makefiles 2017-03-24 16:12:18 -06:00

README.md

wolfCrypt JNI

This package provides a Java, JNI-based interface to the native wolfCrypt FIPS API.

Compiling


To compile the wolfcrypt-jni wrapper:

  1. Compile and install a wolfSSL FIPS release (wolfssl-x.x.x-commercial-fips):
$ cd wolfssl-x.x.x-commercial-fips
$ ./configure --enable-fips --enable-keygen
$ make check
$ sudo make install
  1. Compile the native wolfCrypt JNI object files:
$ cd wolfcrypt-jni
$ make
  1. Compile the wolfCrypt JNI Java sources files, from the wolfcrypt-jni directory:
$ ant
$ ant test

In order for the JUnit tests to be run correctly when executing "ant test", please follow these steps (for Linux/Mac):

Running "ant test" will execute JUnit tests included in this package. These tests require JUnit to be available on your system and for the correct JAR files to be on your JUNIT_HOME path.

To install and set up JUnit:

a) Download "junit-4.12.jar" and "hamcrest-core-1.3.jar" from junit.org

b) Place these JAR files on your system and set JUNIT_HOME to point to that location:

$ export JUNIT_HOME=/path/to/jar/files

API Javadocs


After the "ant" command has been executed, this will generate a set of Javadocs under the wolfcrypt-jni/docs directory. To view the root document, open the following file in a web browser:

wolfcrypt-jni/docs/index.html

Example / Test Code


The JUnit test code can act as a good usage example of the wolfCrypt JNI API. This test code is run automatically when "ant test" is executed from the root wolfcrypt-jni directory. The test source code is located at:

wolfcrypt-jni/src/test/com/wolfssl/wolfcrypt

JAR Code Signing


The wolfcrypt-jni.jar can be code signed by placing a "codeSigning.properties" file in the "wolfcrypt-jni" root directory. The ant build script (build.xml) will detect the prescense of this properties file and use the provided information to sign the generated JAR file.

"codeSigning.properties" should have the following properties set:

sign.alias=<signing alias in keystore>
sign.keystore=<path to signing keystore>
sign.storepass=<keystore password>
sign.tsaurl=<timestamp server url>