Chris Conlon
342eb2f25a
JNI: add additional error checks to JNI WolfSSLSession.read(ByteBuffer) function
2025-04-30 14:34:28 -06:00
JacobBarthelmeh
994950fffb
Merge pull request #258 from cconlon/nativeALPNSelectCbXSTRTOKFix
...
Null terminate `NativeALPNSelectCb()` peer protocol list before XSTRTOK
2025-04-29 15:33:20 -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
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
1a7534c726
JSSE: adjust SSLSession.getPacketBufferSize() for tls-channel compatibility, wrap native wolfSSL_GetMaxOutputSize()
2025-04-10 15:10:53 -06: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
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
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
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
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
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
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
Chris Conlon
4dbbef94b9
JNI: always call wolfSSL_get1_session() inside native JNI getSession(), callers expect to always free returned pointer
2024-12-06 09:41:33 -07:00
Chris Conlon
4395d7a0b1
JNI/JSSE: use select() for Windows since no poll() available
2024-11-06 14:04:31 -07:00
Chris Conlon
7231009800
JSSE: only resume sessions from Java client cache if same cipher suite and protocol are enabled
2024-08-06 14:31:52 -06:00
Chris Conlon
13da2b023b
Merge pull request #210 from rlm2002/timeouts
...
read returns error value to timeout
2024-07-19 13:39:10 -06:00
Ruby Martin
8f09aae2fa
set size equal to ret if ret does not equal RECV_READY or SEND_READY
2024-07-19 11:41:32 -06:00
Chris Conlon
58c63ded96
JNI: wrap native wolfSSL_SESSION_dup() in WolfSSLSession.duplicateSession()
2024-07-12 15:04:38 -06:00
Chris Conlon
6e08b929dc
JNI/JSSE: use poll() instead of select() as default descriptor event function
2024-06-27 16:34:39 -06:00
Chris Conlon
7e5ace50c8
JNI: call select() again when return -1 and errno is EAGAIN
2024-06-27 16:34:39 -06:00
Chris Conlon
1afd3fcc30
JNI: wrap native wolfSSL_SESSION_is_resumable() in WolfSSLSession.sessionIsResumable()
2024-05-31 14:21:15 -06:00
Chris Conlon
907a3d45d0
JNI: wrap wolfSSL_SESSION_has_ticket() in WolfSSLSession.hasSessionTicket()
2024-05-16 16:11:01 -06:00
JacobBarthelmeh
a2db7c3bcc
Merge pull request #191 from cconlon/sessionIsSetup
...
JNI: wrap wolfSSL_SessionIsSetup() in WolfSSLSession
2024-04-25 16:58:39 -06:00
Chris Conlon
7e1c0397fb
JNI: check if session has ticket for TLS 1.3 before calling wolfSSL_peek() in WolfSSLSession.getSession()
2024-04-25 14:15:39 -06:00
Chris Conlon
76ac7784de
JNI: wrap wolfSSL_SessionIsSetup() in WolfSSLSession, needs wolfSSL > 5.7.0 or WOLFSSL_PR7430_PATCH_APPLIED defined
2024-04-22 17:14:16 -06:00
Chris Conlon
0bf4b58535
JNI: rework WolfSSLSession.useALPN() to guarantee list is null terminated
2024-04-19 14:18:51 -06:00
Chris Conlon
6229224d5d
Fix Windows build warnings, update WindowsConfig.bat, ALPN bytes test in WolfSSLSession
2024-04-05 16:20:03 -06:00
Chris Conlon
6521c21863
JNI/JSSE: remove extraneous array copy in WolfSSLInputStream/OutputStream when array offset is provided
2024-04-04 16:54:48 -06:00
Chris Conlon
1d91773392
JNI: call ReleaseByteArrayElements() in read/write if native wolfSSL_get_app_data() fails
2024-04-03 13:53:31 -06:00
Daniel Pouzzner
4d556fb77c
Merge pull request #180 from cconlon/SSLEngineGCFix
...
Release native verify callback with SSLEngine is closed
2024-03-30 03:03:32 -04:00
Chris Conlon
3dee881dda
JNI: wrap wolfSSL_set_tls13_secret_cb() in WolfSSLSession.setTls13SecretCb(), along with example in Client.java
2024-03-28 10:05:10 -06:00
Chris Conlon
a7031b395f
JNI/JSSE: delete global verify callback before resetting in WolfSSLSession.setVerify()
2024-03-26 14:40:42 -06:00
Chris Conlon
1d5cbd66c7
JNI: wrap native wolfSSL_use_certificate_chain_buffer_format() in WolfSSLSession
2024-02-14 13:39:44 -07:00
Chris Conlon
21e35057c1
JNI/JSSE: check for ticket with TLS 1.3 before saving WOLFSSL_SESSION to cache
2024-02-12 17:09:30 -07:00
Chris Conlon
247aedd2b1
JNI: call select() again on error with EINTR
2024-01-29 17:33:13 -07:00
Chris Conlon
85cfeeaf90
update copyright to 2024
2024-01-16 15:35:09 -07:00
Chris Conlon
682f1ea5fc
JSSE: add support for SSLSocket/SSLEngine get/setHandshakeApplicationProtocolSelector() for ALPN select support
2024-01-03 11:19:47 -07:00
Chris Conlon
f29486d72e
JSSE: add implementation of X509ExtendedTrustManager for internal hostname verification
2023-11-27 15:47:43 -07:00
Chris Conlon
3d6ceb09a3
JNI/JSSE: pass socket timeout to select() for wolfSSL_accept()
2023-10-19 15:04:30 -06:00
Chris Conlon
544e054ce3
JNI: lock jniSessLock in native WolfSSLSession.get1Session() since we call wolfSSL_peek() which does I/O
2023-10-18 10:40:58 -06:00
Chris Conlon
7da3a34dd7
JNI: change debug printf for setFd() to Info instead of Error, Java app may use I/O callbacks with no fd
2023-10-11 15:03:20 -06:00
Chris Conlon
4db4c2bdcf
JNI/JSSE: wrap native wolfSSL_SetServerID() and call on client side from WolfSSLEngineHelper.doHandshake()
2023-08-16 10:40:40 -06:00