Bug 54997

Summary: SSL Handshake implementation in AsycnChannelWrapperSecure does not handle SSLEngineResult.Status.BUFFER_UNDERFLOW and SSLEngineResult.Status.BUFFER_OVERFLOW states
Product: Tomcat 8 Reporter: Niki Dokovski <nickytd>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: nickytd
Priority: P2    
Version: 8.0.x-trunk   
Target Milestone: ----   
Hardware: PC   
OS: All   
Attachments: patch in AsyncChannelWrapperSecure.java

Description Niki Dokovski 2013-05-21 07:22:32 UTC
When SSLEngineResult.Status.BUFFER_UNDERFLOW and SSLEngineResult.Status.BUFFER_OVERFLOW states occur during ssl handshake the implementation throws SSLException instead of continuing the procedure described here http://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLEngine.html
Comment 1 Niki Dokovski 2013-05-22 10:58:00 UTC
Created attachment 30309 [details]
patch in AsyncChannelWrapperSecure.java

illustrating a potential improvement in handling the buffer underflow state
Comment 2 Mark Thomas 2013-05-29 10:18:10 UTC
Thanks for the report. I applied a different patch as I wanted to avoid duplicate code as far as possible. The issue should be fixed in trunk but feel free to re-open the issue if that is not the case.
Comment 3 Niki Dokovski 2013-05-29 10:33:38 UTC
Thanks Mark, It works just fine.