Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 9 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,20 @@

<echo unless:set="jar.includes.jce">NOTE: JCE classes not detected, only running JUnit tests for JNI</echo>

<!-- Windows DLL directories are only set by the setup-win* targets -->
<condition property="test.library.path"
value="${lib.dir}${path.separator}${lib.win.dir}${path.separator}${lib.wolfssl.win.dir}"
else="${lib.dir}">
<isset property="lib.win.dir"/>
</condition>

<!-- run JUnit tests -->
<junit printsummary="yes"
showoutput="yes"
haltonfailure="yes"
fork="true">

<jvmarg value="-Djava.library.path=$JAVA_HOME/bin${path.separator}${lib.dir}${path.separator}${lib.win.dir}${path.separator}${lib.wolfssl.win.dir}"/>
<jvmarg value="-Djava.library.path=${test.library.path}"/>

<classpath>
<pathelement location="${lib.dir}/wolfcrypt-jni.jar" />
Expand All @@ -661,7 +668,7 @@
<formatter type="plain" />
<formatter type="xml" />

<sysproperty key="sun.boot.library.path" value="$JAVA_HOME/bin:${lib.dir}" />
<sysproperty key="sun.boot.library.path" value="${lib.dir}" />
<sysproperty key="wolfjce.debug" value="${jce.debug}" />
<env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:{lib.dir}:/usr/local/lib" />
<env key="CLASSPATH" path="${env.LD_LIBRARY_PATH}:${env.JUNIT_HOME}/${junit4}" />
Expand Down
1 change: 1 addition & 0 deletions jni/jni_ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ JNIEXPORT void JNICALL Java_com_wolfssl_wolfcrypt_Ecc_wc_1ecc_1import_1private
name = (*env)->GetStringUTFChars(env, curveName, 0);
if (name == NULL) {
/* OutOfMemoryError pending, release arrays and return */
zeroizeByteArrayCopy(priv, privSz, privIsCopy);
releaseByteArray(env, priv_object, priv, JNI_ABORT);
releaseByteArray(env, pub_object, pub, JNI_ABORT);
return;
Expand Down
Loading