diff src/org/eclipse/jetty/io/nio/SslConnection.java @ 1002:35d04ac3fd0b

simplify ssl
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 22 Oct 2016 21:56:44 -0600
parents bdb6eb0fbf93
children 21910079096e
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/nio/SslConnection.java	Sat Oct 22 20:56:41 2016 -0600
+++ b/src/org/eclipse/jetty/io/nio/SslConnection.java	Sat Oct 22 21:56:44 2016 -0600
@@ -49,7 +49,7 @@
 {
 	private final Logger _logger = LoggerFactory.getLogger("org.eclipse.jetty.io.nio.ssl");
 
-	private static final NIOBuffer __ZERO_BUFFER=new IndirectNIOBuffer(0);
+	private static final NIOBuffer __ZERO_BUFFER = new IndirectNIOBuffer(0);
 
 	private static final ThreadLocal<SslBuffers> __buffers = new ThreadLocal<SslBuffers>();
 	private final SSLEngine _engine;
@@ -62,7 +62,7 @@
 	private NIOBuffer _unwrapBuf;
 	private NIOBuffer _outbound;
 	private final AsyncEndPoint _aEndp;
-	private boolean _allowRenegotiate=true;
+	private boolean _allowRenegotiate = true;
 	private boolean _handshook;
 	private boolean _ishut;
 	private boolean _oshut;
@@ -88,23 +88,14 @@
 	public SslConnection(SSLEngine engine,AsyncEndPoint endp)
 	{
 		super(endp);
-		_engine=engine;
-		_session=_engine.getSession();
-		_aEndp=endp;
+		_engine = engine;
+		_session = _engine.getSession();
+		_aEndp = endp;
 		_sslEndPoint = new SslEndPoint();
 	}
 
 	/* ------------------------------------------------------------ */
 	/**
-	 * @return True if SSL re-negotiation is allowed (default false)
-	 */
-	public boolean isAllowRenegotiate()
-	{
-		return _allowRenegotiate;
-	}
-
-	/* ------------------------------------------------------------ */
-	/**
 	 * Set if SSL re-negotiation is allowed. CVE-2009-3555 discovered
 	 * a vulnerability in SSL/TLS with re-negotiation.  If your JVM
 	 * does not have CVE-2009-3555 fixed, then re-negotiation should
@@ -119,7 +110,6 @@
 		_allowRenegotiate = allowRenegotiate;
 	}
 
-	/* ------------------------------------------------------------ */
 	private void allocateBuffers()
 	{
 		synchronized (this)
@@ -140,7 +130,6 @@
 		}
 	}
 
-	/* ------------------------------------------------------------ */
 	private void releaseBuffers()
 	{
 		synchronized (this)
@@ -207,14 +196,15 @@
 		}
 	}
 
+	@Override
 	public boolean isSuspended()
 	{
 		return false;
 	}
 
+	@Override
 	public void onInputShutdown() throws IOException
 	{
-
 	}
 
 	private synchronized boolean process(Buffer toFill, Buffer toFlush) throws IOException
@@ -261,7 +251,7 @@
 
 			// If we have no data to flush, flush the empty buffer
 			if (toFlush==null)
-				toFlush=__ZERO_BUFFER;
+				toFlush = __ZERO_BUFFER;
 
 			// While we are making progress processing SSL engine
 			boolean progress=true;