Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

BUFFER_UNDERFLOW: SSLEngine refuses to decrypt data

843811Feb 9 2009 — edited Feb 12 2009
Hi,

while stress testing an application that uses SSLEngine to encrypt and decrypt data I get a Status.BUFFER_UNDERFLOW without any obvious reason.

At the time when the underflow occurs on the server, several thousand client-server roundtrips over a keep-alive TCP connection, passed without problems.

Buffers before sslEngine.unwrap(inNetBuf, inAppBuf):
inNetBuf = java.nio.HeapByteBuffer[pos=0 lim=3760 cap=16665]
outAppBuf = java.nio.HeapByteBuffer[pos=0 lim=16660 cap=16660]
Buffers after sslEngine.unwrap(inNetBuf, inAppBuf):
inNetBuf = java.nio.HeapByteBuffer[pos=0 lim=3760 cap=16665]
outAppBuf = java.nio.HeapByteBuffer[pos=0 lim=16660 cap=16660]
SSLEngineResult of the unwrap operation:
Status = BUFFER_UNDERFLOW HandshakeStatus = NOT_HANDSHAKING
bytesConsumed = 0 bytesProduced = 0
Any hints what may be going wrong?

--
Cheers,
Alex
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2009
Added on Feb 9 2009
11 comments
1,858 views