@Override public void closeInbound() throws SSLException { engine.closeInbound(); }
@Override public void closeInbound() throws SSLException { engine.closeInbound(); }
@Override public void closeInbound() throws SSLException { delegate.closeInbound(); }
@Override public void closeInbound() throws SSLException { delegate.closeInbound(); }
public void closeInbound() throws SSLException { delegate.closeInbound(); }
public void closeInbound() throws SSLException { currentRef.get().closeInbound(); }
public void closeInbound() throws SSLException { currentRef.get().closeInbound(); }
public void closeInbound() throws SSLException { currentRef.get().closeInbound(); }
void close() { sslEngine.closeOutbound(); try { sslEngine.closeInbound(); } catch (Exception e) { // ignore } } }
/** * In addition to orderly shutdowns, an unorderly shutdown may occur, when the transport link (socket channel) * is severed before close messages are exchanged. This may happen by getting an -1 or {@link IOException} * when trying to read from the socket channel, or an {@link IOException} when trying to write to it. * In both cases {@link SSLEngine#closeInbound()} should be called and then try to follow the standard procedure. * * @throws IOException if an I/O error occurs to the socket channel. */ private void handleEndOfStream() throws IOException { try { engine.closeInbound(); } catch ( Exception e ) { log.error( "This engine was forced to close inbound, without having received the proper SSL/TLS close notification message from the peer, due to end of stream." ); } closeConnection(); }
@Override public void closeInbound() throws SSLException { NextProtoNego.remove(engine); engine.closeInbound(); }
/** * 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; } }
public synchronized void closeInbound() { try { engine.closeInbound(); } catch (SSLException e) { Log.warn("SSL error while closing connection", "message", Msc.errorMsg(e)); } }
/** * Shuts down the handler. */ void shutdown() { try { sslEngine.closeInbound(); } catch (SSLException e) { // According to javadoc, the only case when exception is thrown is when no close_notify // message was received before TCP connection get closed. if (log.isDebugEnabled()) log.debug("Unable to correctly close inbound data stream (will ignore) [msg=" + e.getMessage() + ", ses=" + ses + ']'); } }
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.closeInbound(); } catch (SSLException e) { if (logger.isDebugEnabled()) {
engine.closeInbound(); } catch (SSLException e) { if (logger.isDebugEnabled()) {
engine.closeInbound();
void notifyReadClosed() { if(anyAreSet(state, FLAG_READ_CLOSED)) { return; } boolean runListener = isReadResumed() && anyAreSet(state, FLAG_CLOSED); connection.readClosed(); try { engine.closeInbound(); } catch (SSLException e) { UndertowLogger.REQUEST_IO_LOGGER.trace("Exception closing read side of SSL channel", e); if(allAreClear(state, FLAG_WRITE_CLOSED) && isWriteResumed()) { runWriteListener(); } } state |= FLAG_READ_CLOSED | FLAG_ENGINE_INBOUND_SHUTDOWN | FLAG_READ_SHUTDOWN; if(anyAreSet(state, FLAG_WRITE_CLOSED)) { closed(); } if(anyAreSet(state, FLAG_WRITE_REQUIRES_READ)) { notifyWriteClosed(); } if(runListener) { runReadListener(false); } }
engine.closeInbound(); } catch (SSLException e) { UndertowLogger.REQUEST_LOGGER.ioException(e);