-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
52 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters