Commit 26a0bb62 authored by guus's avatar guus

Undoing last change.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@12974 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3fc8cd44
......@@ -20,6 +20,13 @@
package org.jivesoftware.openfire.net;
import org.jivesoftware.openfire.Connection;
import org.jivesoftware.util.JiveGlobals;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLEngineResult.HandshakeStatus;
import javax.net.ssl.SSLSession;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
......@@ -30,16 +37,6 @@ import java.nio.channels.ReadableByteChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.WritableByteChannel;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLEngineResult.HandshakeStatus;
import javax.net.ssl.SSLSession;
import org.jivesoftware.openfire.Connection;
import org.jivesoftware.util.JiveGlobals;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* TLSStreamHandler is responsible for securing plain connections by negotiating TLS. By creating
* a new instance of this class the plain connection will be secured.
......@@ -48,8 +45,6 @@ import org.slf4j.LoggerFactory;
*/
public class TLSStreamHandler {
private static Logger Log = LoggerFactory.getLogger(TLSStreamHandler.class);
private TLSStreamWriter writer;
private TLSStreamReader reader;
......@@ -214,11 +209,7 @@ public class TLSStreamHandler {
switch (initialHSStatus) {
case NEED_UNWRAP:
final int bytesRead = rbc.read(incomingNetBB);
if (bytesRead == 0) {
Log.error("Read 0 bytes!");
}
if (bytesRead == -1) {
if (rbc.read(incomingNetBB) == -1) {
tlsEngine.closeInbound();
return initialHSComplete;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment