Commit Graph

1139 Commits (master)

Author SHA1 Message Date
Chris Conlon d466ff16e4 JNI test: remove min ECC key size not divisible by 8 test, no longer fails with https://github.com/wolfSSL/wolfssl/pull/8691 2025-04-25 16:09:58 -06:00
Chris Conlon 34d3e873a6 JNI: NativeALPNSelectCb() fix to make sure peer proto array is null terminated before calling XSTRTOK() 2025-04-25 16:08:46 -06:00
Chris Conlon 6a243c4149 JNI test: add JUnit tests for WolfSSLSession I/O ByteBuffer callbacks 2025-04-22 09:56:51 -06:00
Chris Conlon 6853e02af8 JNI test: remove min ECC key size not divisible by 8 test, no longer fails with https://github.com/wolfSSL/wolfssl/pull/8691 2025-04-17 16:45:20 -06:00
Chris Conlon 8ebd050a5a JSSE: add ByteBuffer I/O callbacks for performance, plug them into WolfSSLEngine 2025-04-17 16:35:52 -06:00
Chris Conlon 3aa056c607 JSSE: new helper functions to throw exceptions (throwWolfSSLJNIException, throwWolfSSLException), avoids calling FindClass unnecessarily, improves performance 2025-04-17 16:34:00 -06:00
Chris Conlon 767a289113 JSSE: cache jmethodIDs used in native I/O callbacks globally, improves performance 2025-04-17 16:34:00 -06:00
Chris Conlon d95297f12c JSSE: refactor WolfSSLEngine to use static output array instead of allocating for each send 2025-04-17 16:34:00 -06:00
Chris Conlon e8826acc4b JSSE: use single direct ByteBuffer in SSLEngine.SendAppData() instead of allocating each time method is called 2025-04-17 16:33:57 -06:00
Chris Conlon 1a7534c726 JSSE: adjust SSLSession.getPacketBufferSize() for tls-channel compatibility, wrap native wolfSSL_GetMaxOutputSize() 2025-04-10 15:10:53 -06:00
Chris Conlon 95bedabeb2
Merge pull request #255 from gasbytes/ResumeTLS13withSNI-patch
Fix TLS 1.3 session resumption to preserve SNI extension
2025-03-12 10:23:19 -06:00
Reda Chouk fd143de8bb Fix TLS 1.3 session resumption to preserve SNI extension 2025-02-27 13:22:20 +01:00
JacobBarthelmeh ad23ac20e9
Merge pull request #254 from cconlon/dtls
Add support for DTLS 1.3 (`DTLSv1.3`) through `SSLContext` / `SSLEngine`
2025-02-26 16:40:05 -07:00
Chris Conlon 5d37d5c13d JSSE: fix SSLEngine client session storage, store when WolfSSLSession error state is not fatal 2025-02-17 15:40:18 -07:00
Chris Conlon 8449b6744e JNI/JSSE: wrap wolfSSL_set_SessionTicket_cb(), add session ticket callback to SSLEngine for detection of ticket received 2025-02-17 15:40:18 -07:00
Chris Conlon d245630133 JNI: skip throwing Java exceptions from NativeLoggingCallback 2025-02-17 15:40:18 -07:00
Chris Conlon 8dfd9aebf8 JSSE: add DTLSv1.3 tests to SSLEngine JUnit test class 2025-02-17 15:40:15 -07:00
Chris Conlon bda5d81afc JNI/JSSE: wrap wolfSSL_dtls_get_drop_stats() for use in WolfSSLEngine DTLS dropped packet detection for BUFFER_UNDERFLOW status 2025-02-17 10:53:19 -07:00
Chris Conlon e82f8373d9 JNI/JSSE: wrap wolfSSL_send_hrr_cookie() in WolfSSLSession.sendHrrCookie(), enable HelloRetryRequest in SSLEngine DTLS 2025-02-17 10:53:19 -07:00
Chris Conlon c373b6b53e JSSE: wait for wolfSSL_connect/accept() to return success before seeing WolfSSLEngine handshakeFinished to true 2025-02-17 10:53:19 -07:00
Chris Conlon b00f14ebbb JNI/JSSE: wrap wolfSSL_DisableExtendedMasterSecret(), add support for System property jdk.tls.useExtendedMasterSecret 2025-02-17 10:53:19 -07:00
Chris Conlon 372ef97746 JSSE: add initial SSLEngine support for DTLSv1.3 2025-02-17 10:53:19 -07:00
Chris Conlon 36a1057366 JNI: add DTLS 1.3 to JNI-only layer 2025-02-17 10:53:17 -07:00
Chris Conlon 45810c8fbf
Merge pull request #253 from gasbytes/HttpsURLConnection/ImpactOnSNI-patch
wolfjsse: auto-enable SNI for HttpsURLConnection
2025-02-05 10:03:06 -07:00
Reda Chouk d075893cbc wolfjsse: auto-enable SNI for HttpsURLConnection
Enable SNI automatically when detecting HttpsURLConnection's unique initialization pattern, fixing ImpactOnSNI test while preserving default SNI behavior for SSL sockets.
2025-02-05 15:23:52 +01:00
Chris Conlon 1e530a911e
Merge pull request #249 from gasbytes/SSLSocketExplorerWithSrvSNI-patch
Add wolfjsse.autoSNI Security property
2025-01-31 16:57:25 -07:00
Reda Chouk 9657eee8a0 Add wolfjsse.autoSNI Security property
Introduce wolfjsse.autoSNI property to make SNI behavior configurable. When
set to true, enables legacy automatic SNI based on hostname/peer. By default,
SNI is only set through explicit SSLParameters configuration.

- Fixes SSLSocketExplorerWithSrvSNI test failures
- Maintains compatibility for existing applications
- Adds test coverage in WolfSSLSocketTest
2025-02-01 00:25:10 +01:00
JacobBarthelmeh 7cf0c4e7ba
Merge pull request #252 from cconlon/classRename
Refactor wolfCrypt level classes to avoid `wolfcrypt-jni` namespace conflicts
2025-01-31 10:29:54 -07:00
Chris Conlon 36bfbd1757 JNI: wrap Atomic Record VerifyDecrypt callback 2025-01-30 16:51:33 -07:00
Chris Conlon 3963b022c1 JNI/JSSE: skip trying to reattach to JVM in NativeLoggingCallback(), may happen on wolfSSL_Cleanup() call from atexit() handler 2025-01-30 16:51:33 -07:00
Chris Conlon 4923528863 JNI: refactor com.wolfssl.wolfcrypt.RSA/ECC/EccKey classes to avoid wolfJCE namespace conflicts, removing com.wolfssl.wolfcrypt directory 2025-01-30 16:51:31 -07:00
JacobBarthelmeh 5e56b00383
Merge pull request #251 from cconlon/1.15release
Prep for 1.15 Release
2025-01-24 14:07:31 -08:00
Chris Conlon cc6d150bca Update ChangeLog for 1.15 release 2025-01-24 14:46:52 -07:00
Chris Conlon ff26562bdb Android: update example app CMakeLists.txt for wolfSSL FIPS Ready compatibility 2025-01-24 12:13:17 -07:00
Chris Conlon 4b00da2c7b JNI: fix Facebook Infer script exit code, and reported thread safety violations / potential deadlock issues 2025-01-23 16:15:58 -07:00
Chris Conlon d5c181e0c2 JNI/JSSE: bump version to 1.15 2025-01-23 14:52:44 -07:00
JacobBarthelmeh d56fa67109
Merge pull request #246 from cconlon/socketCloseInterruptsWriteRead
JSSE: calling SSLSocket.close() should interrupt threads blocked in select()/poll()
2025-01-21 15:29:17 -08:00
Chris Conlon cd8c49eae9 JNI/JSSE: remove incorrect preprocessor gate around native wolfSSL_GetSide() 2025-01-21 10:20:17 -07:00
Chris Conlon 336af4daf9 JNI/JSSE: fix VS warning about uninitialized local pointer variable 2025-01-21 10:20:17 -07:00
Chris Conlon 94281c3150 JSSE: add CountDownLatch to WolfSSLSocketTest TestServer/Client to wait until threads are finished before checking for Exceptions 2025-01-21 10:20:17 -07:00
Chris Conlon dc5e43c70d JNI/JSSE: Add java.sh usage to README.md 2025-01-21 10:20:17 -07:00
Chris Conlon 3828f97161 GitHub Actions: add test for java.sh defining WOLFJNI_USE_IO_SELECT (non default) 2025-01-21 10:20:17 -07:00
Chris Conlon 4310544089 JNI/JSSE: pass CFLAGS to java.sh gcc commands 2025-01-21 10:20:17 -07:00
Chris Conlon 85dc1542e1 JSSE: calling SSLSocket.close() should interrupt threads blocked in select()/poll() 2025-01-21 10:20:14 -07:00
JacobBarthelmeh f5c9289097
Merge pull request #248 from cconlon/copyright2025
JNI/JSSE: update copyright to 2025
2025-01-20 14:42:47 -08:00
Chris Conlon e600b0f056
Merge pull request #250 from gasbytes/SSLEngine-patch
fix: handle DirectByteBuffers in WolfSSLSession.read()
2025-01-10 11:50:30 -07:00
Reda Chouk 5de02dc3fe fix: handle DirectByteBuffers in WolfSSLSession.read()
Fix of improper handling of DirectByteBuffers in the JNI layer.
Previously, the native read() method would throw an exception when
encountering a DirectByteBuffer, breaking the optimization path for
single-buffer reads in WolfSSLEngine.

This change modifies the JNI implementation to properly handle both
array-backed and direct ByteBuffers, maintaining the performance benefits
of both buffer types while fixing the test failure.

- Added support for DirectByteBuffers using GetDirectBufferAddress
- Preserved existing optimization path for array-backed buffers
- Maintained proper position updates and error handling for both types
- Fixed SSLEngine/Arrays test without compromising performance
2025-01-10 19:02:57 +01:00
JacobBarthelmeh 63052defb4
Merge pull request #244 from cconlon/sslEngineOptimization
JNI/JSSE: optimize out array creation in WolfSSLEngine RecvAppData()
2025-01-06 16:58:08 -07:00
Chris Conlon 12eae28c14 JNI/JSSE: optimize out array creation in WolfSSLEngine RecvAppData(), pass ByteBuffer down to JNI directly 2025-01-06 16:22:28 -07:00
Chris Conlon eb4ee89bd0 JNI/JSSE: update copyright to 2025 2025-01-06 15:48:38 -07:00