A workaround for 'missing algorithm' error during handshake

This commit is contained in:
Trustin Lee 2008-11-16 15:06:10 +00:00
parent 333f45ccd5
commit dce019966e

View File

@ -624,7 +624,14 @@ public class SslHandler extends FrameDecoder {
try { try {
loop: loop:
for (;;) { for (;;) {
SSLEngineResult result = engine.unwrap(inNetBuf, outAppBuf); SSLEngineResult result;
if (handshaking) {
synchronized (handshakeLock) {
result = engine.unwrap(inNetBuf, outAppBuf);
}
} else {
result = engine.unwrap(inNetBuf, outAppBuf);
}
switch (result.getHandshakeStatus()) { switch (result.getHandshakeStatus()) {
case NEED_UNWRAP: case NEED_UNWRAP: