Commit Graph

1078 Commits (devin/1741390781-dtls13-examples)

Author SHA1 Message Date
Devin AI 7189b086fe Add DTLS 1.3 SSLEngine example client and server applications
Co-Authored-By: chris@wolfssl.com <chris@wolfssl.com>
2025-03-07 23:44:32 +00: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
JacobBarthelmeh 925bf80281
Merge pull request #247 from cconlon/fipsRunAllCasts
JNI/JSSE: call wc_RunAllCast_fips() for FIPS builds when available
2025-01-06 15:34:46 -07:00
Chris Conlon 501150e170 JNI/JSSE: call wc_RunAllCast_fips() for FIPS builds when available, add conditional defines for per-algo CAST functions 2025-01-06 15:14:39 -07:00
Chris Conlon e138599124
Merge pull request #243 from gasbytes/LegacyDHEKeyExchange-patch
Added check for legacy DHE keys (for cipher suites using keys less than 1024 bits)
2024-12-23 16:16:43 -07:00
Reda Chouk 967f75e84b Proper styling for comments to match code standards (WolfSSLEngineHelper.java) and fixed identation (WolfSSLSocket.java) 2024-12-23 23:52:23 +01:00
Reda Chouk 20befbc368 Added check for legacy DHE keys (for cipher suites using keys less than 1024 bits) 2024-12-23 23:23:44 +01:00
Chris Conlon 9db7ff1f49
Merge pull request #242 from rlm2002/sniServerNames
getSNIRequest checks for null value before converting to String
2024-12-16 09:27:18 -07:00
Ruby Martin 5c6d7eb7c0 getSNIRequest checks for null value before converting to String 2024-12-12 16:34:30 -07:00
Chris Conlon 8ae65d442f
Merge pull request #241 from rlm2002/sniServerNames
Add getSNIRequestBytes() and modify return value of getSNIRequest()
2024-12-12 12:30:09 -07:00
Ruby Martin 8647c693d8 Add method getSNIRequestBytes() to return byte array, modify getSNIRequest to return String value of byte array 2024-12-12 10:48:22 -07:00
Chris Conlon 21beea33bb
Merge pull request #240 from rlm2002/sniServerNames
Return cached SNI request from Server side
2024-12-10 14:08:54 -07:00
Ruby Martin 6abb250d6f JSSE: return cached SNI request on Server side 2024-12-10 10:41:25 -07:00