You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We began to use a JCE provider that has specific optimizations through the JNI using direct byte buffers. However, even though our protocol messages were using direct byte buffers, by the time the data was passed to the cipher to be encrypted, it had turned into a heap byte buffer.
I did some digging and found this to be happening in SslHandler. The buffer was coming from SslBufferPool. I re-implemented SslBufferPool to return direct buffers (rather than heap buffers) but unfortunately this resulted in crashes. SslHandler calls .array() in a few places, which is unsupported for direct buffers.
Another problem I ran into was that SslBufferPool's methods were protected rather than public, which made it impossible to create a new implementation outside of the same package.
Note, I encountered this issue in Netty 3.2.7 Final, so I am not sure if it has been addressed in later releases.
Thanks,
Jason
The text was updated successfully, but these errors were encountered:
Hello,
We began to use a JCE provider that has specific optimizations through the JNI using direct byte buffers. However, even though our protocol messages were using direct byte buffers, by the time the data was passed to the cipher to be encrypted, it had turned into a heap byte buffer.
I did some digging and found this to be happening in SslHandler. The buffer was coming from SslBufferPool. I re-implemented SslBufferPool to return direct buffers (rather than heap buffers) but unfortunately this resulted in crashes. SslHandler calls .array() in a few places, which is unsupported for direct buffers.
Another problem I ran into was that SslBufferPool's methods were protected rather than public, which made it impossible to create a new implementation outside of the same package.
Note, I encountered this issue in Netty 3.2.7 Final, so I am not sure if it has been addressed in later releases.
Thanks,
Jason
The text was updated successfully, but these errors were encountered: