@Override public void closeOutbound() { engine.closeOutbound(); }
@Override public void closeOutbound() { engine.closeOutbound(); }
@Override public void closeOutbound() { delegate.closeOutbound(); }
/** * Signals that no more outbound application data will be sent on this TLSHandler. * * @throws SSLException */ public void close() throws SSLException { // Indicate that application is done with engine tlsEngine.closeOutbound(); }
@Override public void closeOutbound() { delegate.closeOutbound(); }
public void closeOutbound() { delegate.closeOutbound(); }
public void closeOutbound() { currentRef.get().closeOutbound(); }
public void closeOutbound() { currentRef.get().closeOutbound(); }
public void closeOutbound() { currentRef.get().closeOutbound(); }
void close() { sslEngine.closeOutbound(); try { sslEngine.closeInbound(); } catch (Exception e) { // ignore } } }
/** * close this stream * * @throws IOException */ @Override public void close() throws IOException { super.close(); if (engine != null) { engine.closeOutbound(); } closed = true; }
public void close() throws IOException { sslEngine.closeOutbound(); sslEngine.getSession().invalidate(); if( socketChannel.isOpen() ) socketChannel.write( wrap( emptybuffer ) );// FIXME what if not all bytes can be written socketChannel.close(); }
/** * This method should be called when this peer wants to explicitly close the connection * or when a close message has arrived from the other peer, in order to provide an orderly shutdown. * <p/> * It first calls {@link SSLEngine#closeOutbound()} which prepares this peer to send its own close message and * sets {@link SSLEngine} to the <code>NEED_WRAP</code> state. Then, it delegates the exchange of close messages * to the handshake method and finally, it closes socket channel. * * @throws IOException if an I/O error occurs to the socket channel. */ private void closeConnection() throws IOException { engine.closeOutbound(); try { doHandshake(); } catch ( IOException e ) { //Just ignore this exception since we are closing the connection already } socketChannel.close(); }
@Override public void closeOutbound() { NextProtoNego.remove(engine); engine.closeOutbound(); }
if (state == State.CLOSING) return; state = State.CLOSING; sslEngine.closeOutbound(); try { if (prevState != State.NOT_INITALIZED && isConnected()) {
private void closeOutbound0(ChannelPromise promise) { outboundClosed = true; engine.closeOutbound(); try { flush(ctx, promise); } catch (Exception e) { if (!promise.tryFailure(e)) { logger.warn("{} flush() raised a masked exception.", ctx.channel(), e); } } }
/** * SSL exceptions are propagated as authentication failures so that clients can avoid * retries and report the failure. If `flush` is true, exceptions are propagated after * any pending outgoing bytes are flushed to ensure that the peer is notified of the failure. */ private void handshakeFailure(SSLException sslException, boolean flush) throws IOException { //Release all resources such as internal buffers that SSLEngine is managing sslEngine.closeOutbound(); try { sslEngine.closeInbound(); } catch (SSLException e) { log.debug("SSLEngine.closeInBound() raised an exception.", e); } state = State.HANDSHAKE_FAILED; handshakeException = new SslAuthenticationException("SSL handshake failed", sslException); // Attempt to flush any outgoing bytes. If flush doesn't complete, delay exception handling until outgoing bytes // are flushed. If write fails because remote end has closed the channel, log the I/O exception and continue to // handle the handshake failure as an authentication exception. try { if (!flush || flush(netWriteBuffer)) throw handshakeException; } catch (IOException e) { log.debug("Failed to flush all bytes before closing channel", e); throw handshakeException; } }
private void closeOutbound0(ChannelPromise promise) { outboundClosed = true; engine.closeOutbound(); try { flush(ctx, promise); } catch (Exception e) { if (!promise.tryFailure(e)) { logger.warn("{} flush() raised a masked exception.", ctx.channel(), e); } } }
private void closeEngine() { engine.closeOutbound(); if (sentCloseNotify == 0 && handshaken) { try { engine.closeInbound(); } catch (SSLException ex) { if (logger.isDebugEnabled()) { logger.debug("Failed to clean up SSLEngine.", ex); } } } }
engine.closeOutbound();