add wolfssl.debug system parameter forr enabling native wolfSSL logging with JSSE

pull/45/head
Chris Conlon 2020-05-19 10:26:31 -06:00
parent 21bde33473
commit 0130005298
2 changed files with 8 additions and 0 deletions

1
README
View File

@ -36,6 +36,7 @@ Release X.X.X has bug fixes and new features including:
- Conversion to use GetByteArrayElements for potential memory use savings
- Consistently use wolfCrypt XMALLOC/XFREE for native memory allocation
- Use javah in build.xml for older ant/Java versions without nativeheaderdir
- Add JSSE debug logging for native wolfSSL with wolfssl.debug system parameter
The wolfSSL JNI Manual is available at:
http://www.wolfssl.com/documentation/wolfSSL-JNI-Manual.pdf. For build

View File

@ -48,6 +48,13 @@ public final class WolfSSLProvider extends Provider {
"Failed to initialize native wolfSSL library");
}
/* enable native wolfSSL debug logging, native wolfSSL must be
* compiled with --enable-debug */
String wolfsslDebug = System.getProperty("wolfssl.debug");
if ((wolfsslDebug != null) && (wolfsslDebug.equalsIgnoreCase("true"))) {
WolfSSL.debuggingON();
}
/* Key Factory */
put("KeyManagerFactory.X509",
"com.wolfssl.provider.jsse.WolfSSLKeyManager");