Giter Site home page Giter Site logo

marianobarrios / tls-channel Goto Github PK

View Code? Open in Web Editor NEW
189.0 10.0 48.0 1.05 MB

A Java library that implements a ByteChannel interface over SSLEngine, enabling easy-to-use (socket-like) TLS for Java applications.

License: MIT License

Java 100.00%
java ssl tls networking non-blocking library sni java-library socket sslengine openssl

tls-channel's Introduction

TLS Channel

TLS Channel is a library that implements a ByteChannel interface over a TLS (Transport Layer Security) connection. It delegates all cryptographic operations to the standard Java TLS implementation: SSLEngine; effectively hiding it behind an easy-to-use streaming API, that allows to secure JVM applications with minimal added complexity.

In other words, a simple library that allows the programmer to implement TLS using the same standard socket API used for plaintext, just like OpenSSL does for C, only for Java, filling a specially painful missing feature of the standard library.

Build Status

Maven Central Javadoc

Main features

  • Implements ByteChannel, GatheringByteChannel and ScatteringByteChannel, the same interfaces implemented by SocketChannel, effectively making encryption an implementation detail. There is no need to directly call SSLEngine except for the initial setup.
  • Works for both client- and server-side TLS.
  • Server-side SNI: Supports choosing different SSLContexts, depending on the received Server Name Indication sent by incoming connections (this feature is not supported at all by SSLEngine, but universally used by web browsers and servers).
  • Supports both blocking and non-blocking modes, using the same API, just like SocketChannel does with unencrypted connections.
  • Supports full-duplex usage, without any cross locking between read and write operations.
  • Pluggable buffer strategy (this is useful for GC-saving buffer pooling, or to use direct buffers to speed up I/O).
  • Full and automatic zeroing of all plaintext contained in internal buffers right after the data stops being necessary (a feature present in boringssl, Google's fork of OpenSSL).
  • Opportunistic buffer release (akin to OpenSSL's SSL_MODE_RELEASE_BUFFERS option), which significantly reduces the memory footprint of idle connections.
  • Full control over TLS shutdown to prevent truncation attacks.
  • An implementation of AsynchronousByteChannel is supplied, offering compatibility for this higher-level API based on callbacks and futures.

Non-features

Being an API layer, TLS Channel delegates all cryptographic operations to SSLEngine, leveraging it 100%. This implies that:

  • Except for a few bytes of parsing at the beginning of server-side connections, to implement SNI, the whole protocol implementation is done by the SSLEngine. Note that this parsing is not done at all if SNI support is disabled.
  • Both the SSLContext and SSLEngine are supplied by the API user; these classes are the ones responsible for protocol configuration, including hostname validation, client-side authentication, encryption, protocol implementation, etc. This means that no cryptographic operation whatsoever is done in this library.
  • Application-Layer Protocol Negotiation (ALPN), supported by SSLEngine since Java 9, also works independently of this library, as the negotiation strategy is configured directly using SSLEngine.

Rationale

The world's most used encryption protocol is TLS. Created by Netscape in 1994 as SSL (Secure Socket Layer), it experimented widespread adoption, which eventually let to its standardization. TLS works on top of the Transport Control Protocol (TCP), maintaining its core abstractions: two independent byte streams, one in each direction, with ordered at-most-once delivery. It can be argued that part of the success of TLS was due to its convenient programming interface, similar to the highly successful and familiar Berkeley Sockets. Currently, there exist a few widely-used implementations:

  • The most used TLS library is OpenSSL. Written in C and (along with some forks) the de facto standard for C and C++. Also widely used in Python, PHP, Ruby and Node.js.
  • The Go language has its own implementation, package crypto/tls.
  • There is another C library by Mozilla, part of the "Network Security Services" (NSS) group of libraries. It's the evolution of the original library wrote by Netscape, and it's now notoriously used by the Firefox browser.

And many more. As noted, all these libraries implement a streaming interface, and most also let the user switch freely between blocking and non-blocking behavior. But in Java the history, unfortunately, is not so simple.

The Java TLS problem

In Java, support for TLS (then SSL) was added in version 1.2 (as an optional package) in the form of a subclass of the Socket class: SSLSocket. Being a subclass, once instantiated, the way of using it was exactly the same as the unencrypted original. That worked (and still works) well enough. Nevertheless, the java I/O API already had some limitations, and an update was due.

java.nio

In version 1.4, a new I/O API was launched (java.nio). It superseded the old I/O API, starting an implicit (and very long) deprecation cycle. New features include:

  • Non-blocking operations.
  • A higher lever API, based on wrapped buffers (ByteBuffers).
  • Direct I/O, with "direct" ByteBuffers, that can live out of the heap. This is specially advantageous for sockets, as the JVM forces an extra copy of any heap-based array sent in a native call (to facilitate synchronization with the garbage collector). Not having the buffer in the heap avoids this step, improving performance (at the cost of more complicated memory management).
  • "Scattering" and "gathering" API, that is, the ability to use more than one sequential buffer in the same I/O operation.

But no TLS support, which was only available in old-style sockets.

SSLEngine

Version 1.5 saw the advent of SSLEngine as the official way of doing TLS over NIO sockets. This API has been the official option for more than a decade. However, it has severe shortcomings:

  • No streaming support. SSLEngine does not do any I/O, or keep any buffers. It does all cryptographic operations on user-managed buffers (but, confusingly, at the same time keeps internal state associated with the TLS connection). This no-data but stateful API is just not what users expect or are used to, and indeed not what the rest of the industry has standardized on.
  • Even considering the constraints, the API is unnecessarily convoluted, with too big a surface, and many incorrect interactions just not prevented at compile-time. It's just extremely hard to use correctly.
  • No support for server-side SNI handling.

What to do

Of course, many programmers don't manipulate TCP or TLS streams directly, but use protocol libraries (e.g., Apache HttpClient, or the newer java.net.http). However, in the case that direct socket-like access is needed, the programmer has essentially three alternatives:

  1. Use the old (implicitly deprecated) socket API. This implies being subject to its limitations, which means, among other things, only blocking behavior.
  2. Use SSLEngine directly. As said, this is a hard task, which is very difficult to accomplish correctly, and in most cases completely out of proportion to the effort of writing the application code.
  3. Use some higher-level I/O library, like Netty, Project Grizzly, Apache Mina or JBoss XNIO. They supply event architectures that intend to ease the task of writing programs that use non-blocking I/O. They are usually big framework-like libraries, sometimes themselves with dependencies. Using one of these is the path chosen by many, but it is not an option if the programmer cannot commit to a particular event architecture, couple the application code to an idiosyncratic library, or include a big dependency.

All three alternatives have been taken by many Java libraries and applications, with no clear preference among leading open-source Java projects. Even though these options can work reasonable well, there was still no clear and standard solution.

Non-SSLEngine TLS in Java

There is actually no strict need to use SSLEngine. The two most common alternatives are:

  • Using the Java Native Interface (JNI) and calling OpenSSL (or other C library). The Tomcat project has a widely used "native" library that eases that task. While using native code can work, it has obvious shortcomings, specially regarding packaging, distribution, type compatibility and runtime safety.
  • "The Legion of the Bouncy Castle" has a "lightweight" TLS API that supports streaming. This actually works, but only in blocking mode, effectively just like using the old SSLSocket API.

Of course, these options imply using an alternative cryptographic implementation, which may not be desired.

Existing open-source SSLEngine users

The feat of using SSLEngine directly is indeed performed by several projects, both general purpose I/O libraries and implementation of particular protocols. Below is an inevitably incomplete list of open-source examples. Every one in the list contains essentially the same general-purpose, SSLEngine-calling code, only embedded in custom types and semantics. That said, these examples, while not really suited for reuse, have been invaluable for both appreciating the difficulty of the task, and also as a source of ideas.

Type Project Package/class
I/O framework Grizzly org.glassfish.grizzly.ssl
I/O framework Netty io.netty.handler.ssl.SslHandler
I/O framework Apache Mina org.apache.mina.filter.ssl.SslHandler
I/O framework XNIO org.xnio.ssl.JsseStreamConduit
HTTP server Tomcat org.apache.tomcat.util.net.SecureNio2Channel
HTTP server OpenJDK sun.net.httpserver.SSLStreams
HTTP client/server Apache HttpComponents org.apache.http.impl.nio.reactor.SSLIOSession
HTTP server Jetty org.eclipse.jetty.io.ssl.SslConnection
Distributed file system XtreemFS org.xtreemfs.foundation.pbrpc.channels.SSLChannelIO
Tor client Orchid com.subgraph.orchid.sockets.sslengine.SSLEngineManager

Usage

Being an instance of ByteChannel, normal I/O operations are just done in the usual way. For instantiation of both client and server connections, builders are used:

ByteChannel rawChannel = ...
SSLContext sslContext = ...
TlsChannel tlsChannel = ClientTlsChannel
    .newBuilder(rawChannel, sslContext)
    .build();
ByteChannel rawChannel = ...
SSLContext sslContext = ...
TlsChannel tlsChannel = ServerTlsChannel
    .newBuilder(rawChannel, sslContext)
    .build();

Typical usage involved creating either a ClientTlsChannel or a ServerTlsChannel, for client and server connections respectively. Both classes implement TlsChannel, where most of the methods are defined.

Complete examples:

Non-blocking

Standard ByteChannel instances communicate the fact that operations would block—and so that they should be retried when the channel is ready—returning zero. However, as TLS handshakes happen transparently and involve multiple messages from each side, both a read and a write operation could be blocked waiting for either a read (byte available) or a write (buffer space available) in the underlying socket. That is, some way to distinguish between read- or write-related blocking is needed.

Ideally, a more complex return type would suffice—not merely an int but some object including more information. For instance, OpenSSL uses special error codes for these conditions: SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE.

In the case of TLS Channel, it is in practice necessary to maintain compatibility with the existing ByteChannel interface. That's why a somewhat unorthodox approach is used: when the operation would block, special exceptions are thrown: NeedsReadException and NeedsWriteException, meaning that the operation should be retried when the underlying channel is ready for reading or writing, respectively.

Typical usage inside a selector loop looks like this:

try {
    int c = tlsChannel.read(buffer);
    ...
} catch (NeedsReadException e) {
    key.interestOps(SelectionKey.OP_READ);
} catch (NeedsWriteException e) {
    key.interestOps(SelectionKey.OP_WRITE);
}

Complete examples:

Off-loop tasks

Selector loops work under the assumption that they don't (mostly) block. This is enough when it is possible to have as many loops as CPU cores. However, Java selectors don't work very well with multiple threads, requiring complicated synchronization; this leads to them being used almost universally from a single thread.

A single I/O thread is in general enough for plaintext connections. But TLS can be CPU-intensive, in particular asymmetric cryptography when establishing sessions. Fortunately, SSLEngine encapsulates those, returning Runnable objects that the client code can run in any thread. TLS Channel can be configured to either run those as part of I/O operations (that is, in-thread)—the default behavior—or not, letting the calling code handle them. The latter option should be enabled at construction time:

TlsChannel tlsChannel = ServerTlsChannel
    .newBuilder(rawChannel, sslContext)
    .withRunTasks(false)
    .build();

An exception (NeedsTaskException) is then used to communicate that a task is ready to run. (Using an exception is needed for the same reasons explained in the previous section):

try {
    int c = tlsChannel.read(buffer);
    ...
} catch ...
} catch (NeedsTaskException e) {
    taskExecutor.execute(() -> {
        e.getTask().run();
        // when the task finished, add it to the ready-set
        // taskReadyKeys should be a concurrent set that shoud be checked 
        // and emptied as part of the selector loop
        taskReadyKeys.add(key);
        selector.wakeup(); // unblock the selector
    });
}

Complete example: non-blocking server with off-loop tasks

Server Name Indication – server side

The Server Name Indication (SNI) is a special TLS extension designed to solve a chicken-and-egg situation between the certificate offered by the server (depending on the host required by the client for multi-host servers) and the host name sent by client in HTTP request headers (necessarily after the connection is established). The SNI extension allows the client to anticipate the required host name in the ClientHello message.

Java added support for SNI in version 7. The feature can be accessed using the SSLParameters class. Sadly, this only works on the client side. For the server, the class allows only to accept or reject connections based on the host name, not to choose the certificate offered.

In TLS Channel, to use SNI-based selection of the SSLContext, a different builder factory method exists, receiving instances of SniSslContextFactory.

SniSslContextFactory contextFactory = (Optional<SNIServerName> sniServerName) -> {
    Optional<SSLContext> ret = ...
    return ret;
};
TlsChannel tlsChannel = ServerTlsChannel
    .newBuilder(rawChannel, contextFactory)
    .build();

Complete example: SNI-aware server

AsynchronousByteChannel

Java 1.7 introduced "asynchronous" byte channels. This infrastructure offers a higher level API for non-blocking I/O, using callbacks and futures. Again, TLS is not supported by the standard API. TLSChannel offers complete support for this programming style using the async package.

// build a singleton-like channel group
AsynchronousTlsChannelGroup channelGroup = new AsynchronousTlsChannelGroup();

// build asynchronous channel, based in an existing TLS channel and the group
AsynchronousTlsChannel asyncTlsChannel = new AsynchronousTlsChannel(channelGroup, tlsChannel, rawChannel);

// use as any other AsynchronousByteChannel
asyncTlsChannel.read(res, null, new CompletionHandler<Integer, Object>() {
    ...
};

Complete example: Asynchronous channel server

Buffers

TLS Channel uses buffers for its operation. Every channel uses at least two ciphertext buffers that hold ciphertext, one for reading from the underlying channel and the other for writing to it. Additionally, a third plaintext buffer may be needed for read operations when the user-supplied buffer is smaller than the minimum SSLEngine needs for placing the decrypted bytes.

All buffers are created from optionally user-supplied factories (instances of BufferAllocator). It is also possible to supply different allocators for plain and ciphertext; for example:

TlsChannel tlsChannel = ServerTlsChannel
    .newBuilder(rawChannel, sslContext)
    .withPlainBufferAllocator(new HeapBufferAllocator())
    .withEncryptedBufferAllocator(new DirectBufferAllocator())
    .build();

The rationale for using direct ciphertext buffers is that, in the most common use case, the underlying channel is a SocketChannel. This channel actually does native I/O operations, which are generally faster using direct buffers.

As default, heap buffers are used to maximize compatibility with different virtual machines, as direct ones are implementation dependent.

Zeroing

Buffers containing plain text are always immediately zeroed after the bytes are returned. This feature is intended as a mitigation against some other security vulnerability that may appear (like, for example, CVE-2014-0160). This is present in boringssl too, Google's fork of OpenSSL.

Due to the minuscule performance penalty and significant security benefits, zeroing cannot be disabled.

Buffer release

TLS Channel supports opportunistic buffer release, a similar feature to OpenSSL's SSL_MODE_RELEASE_BUFFERS option. If, after any operation, a buffer does not contain any bytes pending, it is released back to the pool. This feature can reduce memory consumption dramatically in the case of long-lived idle connections, which tend to happen when implementing server-side HTTPS.

This option is enabled by default, and could be disabled if desired:

TlsChannel tlsChannel = ServerTlsChannel
    .newBuilder(rawChannel, sslContext)
    .withReleaseBuffers(false)
    .build();

Compatibility and certificate validation

Because the protocol implementation is fully delegated to SSLEngine, there are no limitations regarding TLS versions: whatever is supported by the Java implementation used will work.

The same applies to certificate validation. All configuration is done using the SSLContext object, which TLS Channel takes as is.

Implementation

Requirements

TLS Channel requires Java 8 or newer.

Size and Dependencies

The library has no dependencies. The main jar file size is below 65 KiB.

Logging

The library uses Java Logging. As a policy, all logging events emitted by the core package are at FINEST level, which is below the default threshold in most logging implementations and thus completely silent by default. The optional tlschannel.async package can log with higher severity in exceptional circumstances, as it manages threads internally.

Similar efforts

  • NIO SSL is a simple library with a similar purpose, written by Corey Baswell.
  • sslfacade is an attempt to offer a more reasonable interface than SSLEngine, written by Kashif Razzaqui.
  • sslengine.example shows how to use SSLEngine, wrapping it in custom classes. It was written by Alex Karnezis.

Credits

This work is based on a preliminary implementation by Claudio Martinez and Mariano Barrios at Despegar.

tls-channel's People

Contributors

cldmartinez avatar fernandezpablo85 avatar john-tipper avatar marianobarrios avatar mbarrios-simscale avatar randolf avatar renovate-bot avatar renovate[bot] avatar rozza avatar sdenboer avatar stincmale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tls-channel's Issues

License clarification needed

Hi,

could you please clarify the license of the tls-channel code:

  • LICENSE.txt says MIT license
  • build.gradle says BSD-style

Thanks

AsynchronousTlsChannelGroup#processPendingInterests can throw CancelledKeyException

In tests of the MongoDB Java driver that use this library, I've seen occasional, non-deterministic failures where AsynchronousTlsChannelGroup#processPendingInterests throws CancelledKeyException, causing AsynchronousTlsChannelGroup.loop to exit. It happens in cases where we are forcing the server to close the socket in order to test failure scenarios.

I'm not exactly sure why this is happening, but I do see that in AsynchronousTlsChannelGroup.loop there is already code that wraps calls to java.nio.channels.SelectionKey#interestOps(int) in a try/catch of CancelledKeyException. Does it make sense to do a similar thing in AsynchronousTlsChannelGroup#processPendingInterests , e.g.

  private void processPendingInterests() {
    for (SelectionKey key : selector.keys()) {
      RegisteredSocket socket = (RegisteredSocket) key.attachment();
      int pending = socket.pendingOps.getAndSet(0);
      if (pending != 0) {
        try {
          key.interestOps(key.interestOps() | pending);
        } catch (CancelledKeyException e) {
          // ignore
        }
      }
    }
  }

Closing an `AsynchronousTlsChannel` concurrently with an `AsynchronousTlsChannelGroup` registering it sometimes causes termination of the `selectorThread`

The method AsynchronousTlsChannelGroup.registerSocket initiates an asynchronous activity and returns. This method is called from the constructor of AsynchronousTlsChannel, which does not wait on RegisteredSocket.registered until the registration is complete (I am not suggesting that it should). As a result, it is possible to create an AsynchronousTlsChannel and call its close method concurrently with AsynchronousTlsChannelGroup registering its registeredSocket.socketChannel. This scenario does not abuse the API, but it allows executions where the following happens:

We shade tls-channel in mongo-java-driver, and received a report which boils down to the bug I described. I can imagine two straightforward approaches on fixing it:

  1. Wait on RegisteredSocket.registered in AsynchronousTlsChannel.close before closing tlsChannel, registeredSocket. The problem with this approach is that it makes the AsynchronousTlsChannel.close method blocking while currently it is not blocking1.
  2. Catch and ignore ClosedChannelException in AsynchronousTlsChannelGroup.registerPendingSockets similarly to how it was done in 59b85a7 to fix #18. This approach seems to be fine.

1 My understanding is that lingering on close cannot be configured for a SocketChannel in non-blocking mode, and TlsChannelBuilder.withWaitForCloseConfirmation has no effect if the underlying channel is non-blocking.

ByteChannel immediately returning -1?

Hello.
I am encountering problems when using TLS-Channel for this page:
https://wpt.live/css/css-color/color-001.html

This is the only page that I am encountering problems with.
Whenever I try to read from the channel (after sending headers), the ByteChannel only gives -1.
This works fine when I use HTTP instead of HTTPS, and skip using tls-channel, so I suspect that it is a problem with tls-channel.

Edit: Right before it logs that it is returning -1, TLS Channel also logs that it receives 1206 bytes from the stream. However, I logged whether I actually received that from ByteChannel#read() in my code (I only call ByteChannel#read at one point in my code), and tls-channel never actually gives me those 1206 bytes.

11.10.2021 21:47:01.142  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Called engine.beginHandshake()
11.10.2021 21:47:01.144  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=BUFFER_OVERFLOW,handshakeStatus=NEED_WRAP,bytesProduced=0,bytesConsumed=0]; engine status: NEED_WRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.145  TRACE [Thread-1] tlschannel.impl.BufferHolder - enlarging buffer outEncrypted, increasing from 4096 to 8192 (automatic enlarge)
11.10.2021 21:47:01.145  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=BUFFER_OVERFLOW,handshakeStatus=NEED_WRAP,bytesProduced=0,bytesConsumed=0]; engine status: NEED_WRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.145  TRACE [Thread-1] tlschannel.impl.BufferHolder - enlarging buffer outEncrypted, increasing from 8192 to 16384 (automatic enlarge)
11.10.2021 21:47:01.146  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=BUFFER_OVERFLOW,handshakeStatus=NEED_WRAP,bytesProduced=0,bytesConsumed=0]; engine status: NEED_WRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.146  TRACE [Thread-1] tlschannel.impl.BufferHolder - enlarging buffer outEncrypted, increasing from 16384 to 17408 (automatic enlarge)
11.10.2021 21:47:01.147  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=OK,handshakeStatus=NEED_UNWRAP,bytesProduced=396,bytesConsumed=0]; engine status: NEED_UNWRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.147  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Writing to channel: java.nio.DirectByteBuffer[pos=0 lim=396 cap=17408]
11.10.2021 21:47:01.149  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=0]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.149  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.176  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 2726, buffer: java.nio.DirectByteBuffer[pos=2726 lim=4096 cap=4096]
11.10.2021 21:47:01.177  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_TASK,bytesProduced=0,bytesConsumed=127]. Engine status: NEED_TASK; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.189  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=OK,handshakeStatus=NEED_UNWRAP,bytesProduced=6,bytesConsumed=0]; engine status: NEED_UNWRAP; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.190  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Writing to channel: java.nio.DirectByteBuffer[pos=0 lim=6 cap=17408]
11.10.2021 21:47:01.190  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=6]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.191  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_TASK,bytesProduced=0,bytesConsumed=28]. Engine status: NEED_TASK; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.192  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=0]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.192  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.192  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 1370, buffer: java.nio.DirectByteBuffer[pos=3935 lim=4096 cap=4096]
11.10.2021 21:47:01.192  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=0]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.192  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.202  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 161, buffer: java.nio.DirectByteBuffer[pos=4096 lim=4096 cap=4096]
11.10.2021 21:47:01.204  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_TASK,bytesProduced=0,bytesConsumed=4080]. Engine status: NEED_TASK; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.249  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NEED_UNWRAP,bytesProduced=0,bytesConsumed=0]. Engine status: NEED_UNWRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.249  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.250  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 344, buffer: java.nio.DirectByteBuffer[pos=360 lim=4096 cap=4096]
11.10.2021 21:47:01.250  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_TASK,bytesProduced=0,bytesConsumed=286]. Engine status: NEED_TASK; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.256  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=NEED_WRAP,bytesProduced=0,bytesConsumed=74]. Engine status: NEED_WRAP; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=4096 cap=4096]], offset=0, length=1]
11.10.2021 21:47:01.256  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=OK,handshakeStatus=FINISHED,bytesProduced=90,bytesConsumed=0]; engine status: FINISHED; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.257  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Writing to channel: java.nio.DirectByteBuffer[pos=0 lim=90 cap=17408]
11.10.2021 21:47:01.257  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.wrap() result: [status=OK,handshakeStatus=NOT_HANDSHAKING,bytesProduced=450,bytesConsumed=412]; engine status: NOT_HANDSHAKING; srcBuffer: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=412 lim=412 cap=412]], offset=0, length=1], outEncrypted: tlschannel.impl.BufferHolder@4dcc3233
11.10.2021 21:47:01.257  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Writing to channel: java.nio.DirectByteBuffer[pos=0 lim=450 cap=17408]
11.10.2021 21:47:01.258  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.258  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.258  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.261  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.261  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.261  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.262  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.262  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.262  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.262  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.262  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.262  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.263  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.263  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.263  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.263  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.263  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.264  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.264  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.265  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.265  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.265  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.265  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.265  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.266  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.266  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.266  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.266  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.266  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.266  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.267  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.267  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.267  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.267  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.268  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.268  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.268  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.268  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.268  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.268  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.268  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.268  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.269  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.269  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.269  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.269  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.269  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.269  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.269  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.270  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.270  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.270  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.270  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.270  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.270  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.270  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.270  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.271  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.271  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.271  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.271  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.271  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.271  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.271  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.271  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.271  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.272  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.272  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.272  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.272  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.272  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.272  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.272  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.272  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.272  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.273  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.273  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.273  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.273  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.273  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.273  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.273  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.273  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.273  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.274  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.274  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.274  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.274  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.274  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.274  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.274  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.274  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.274  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.275  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.275  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.275  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.275  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.275  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.275  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.275  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.275  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.276  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.276  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.276  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.276  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.276  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.276  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.276  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.276  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.277  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.278  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.279  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.279  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.279  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.280  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.280  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.280  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.281  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.281  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.281  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.281  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.281  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.282  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.282  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.282  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.282  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.283  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.283  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.283  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.283  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.283  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.283  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.284  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.284  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.284  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 255, buffer: java.nio.DirectByteBuffer[pos=255 lim=4096 cap=4096]
11.10.2021 21:47:01.286  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=FINISHED,bytesProduced=0,bytesConsumed=255]. Engine status: FINISHED; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.286  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.286  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.286  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.286  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.287  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.287  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.287  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.287  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.287  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.287  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.287  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.288  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.288  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.288  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.288  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.288  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.288  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.289  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.289  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.289  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.289  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.290  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.290  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.290  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.290  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.290  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.290  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.290  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.290  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.291  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.291  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.291  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.291  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.291  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.291  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.291  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.292  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.292  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.292  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.292  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.292  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.292  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.292  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.292  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.293  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.293  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.293  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.293  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.293  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.293  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.293  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.293  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.293  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.294  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.294  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.294  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.294  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.294  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.294  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.295  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.295  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.295  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.295  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.295  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.295  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.296  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.296  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.296  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.296  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.296  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.297  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.297  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.297  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.297  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.297  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.297  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.297  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.298  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.298  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.298  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.299  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.299  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.299  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.300  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.300  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.300  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.300  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.300  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.300  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.301  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.301  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.301  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.301  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.301  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.301  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.301  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.301  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.301  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.302  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.302  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.302  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.302  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.302  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.302  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.302  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.302  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.302  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.303  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.304  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.304  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.304  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.304  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.304  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.304  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.304  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.305  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.305  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.305  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.305  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.305  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.305  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.305  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.305  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.305  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.306  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.306  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.306  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.306  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.306  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.306  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.307  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.307  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.307  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.307  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.307  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.307  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.307  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.307  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.307  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.308  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.308  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.308  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.308  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.308  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.308  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.309  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.309  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.309  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.309  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.309  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.309  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.309  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.309  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.309  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.310  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.310  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.310  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.310  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.310  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.310  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.311  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.311  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.311  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.311  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.311  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.311  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.311  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.312  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.312  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 0, buffer: java.nio.DirectByteBuffer[pos=0 lim=4096 cap=4096]
11.10.2021 21:47:01.313  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=BUFFER_UNDERFLOW,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.313  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.313  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: 1206, buffer: java.nio.DirectByteBuffer[pos=1206 lim=4096 cap=4096]
11.10.2021 21:47:01.314  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - engine.unwrap() result [status=OK,handshakeStatus=FINISHED,bytesProduced=0,bytesConsumed=255]. Engine status: FINISHED; inEncrypted tlschannel.impl.BufferHolder@4435594d; inPlain: ByteBufferSet[array=[java.nio.HeapByteBuffer[pos=0 lim=8192 cap=8192]], offset=0, length=1]
11.10.2021 21:47:01.314  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Reading from channel
11.10.2021 21:47:01.314  TRACE [Thread-1] tlschannel.impl.TlsChannelImpl - Read from channel; response: -1, buffer: java.nio.DirectByteBuffer[pos=951 lim=4096 cap=4096]

SSL Check

I just finished testing something i built using this. Tried testing for a variety of scenarios and it seems that tlsChannel client doesn't check whether the server is speaking ssl. You can call write and it won't give you any error. In my case, it was the server closing the connection after a given timeout that stopped the client. otherwise it just doesn't return any error (in blocking mode).

Handshake don't work

Automatically handskake dont' work.
My code:
`

while (!stop) {

selector.select();
Iterator<SelectionKey> iterator = selector.selectedKeys().iterator();
while (iterator.hasNext()) {
    SelectionKey key = iterator.next();
iterator.remove();
if (key.isValid()) {
try {
    if (key.isAcceptable()) {
        SocketChannel socketChannel = ((ServerSocketChannel) key.channel()).accept();
	socketChannel.configureBlocking(false);
	TlsChannel tlsChannel = ServerTlsChannel.newBuilder(socketChannel, context).build();
	SelectionKey newKey = socketChannel.register(selector, SelectionKey.OP_READ);
	connections.put(tlsChannel, new NIOConnection(socketChannel));
	newKey.attach(tlsChannel);
    }
    else if (key.isReadable()) {
        TlsChannel socketChannel = (TlsChannel) key.attachment();
	NIOConnection connection = connections.get(socketChannel);
	int readResult = connection.read();
	if (readResult == RW_READY) {
	    connection.processing();
	    key.interestOps((key.interestOps() ^ SelectionKey.OP_READ) | SelectionKey.OP_WRITE);
	}
	else if (readResult == RW_CLOSE) {
	    socketChannel.close();
	    connections.remove(socketChannel);
	}
    }
    else if (key.isWritable()) {
        TlsChannel socketChannel = (TlsChannel) key.attachment();
        NIOConnection connection = connections.get(socketChannel);
        int readResult = connection.write();
        if (readResult == RW_READY) {
             key.interestOps((key.interestOps() ^ SelectionKey.OP_WRITE) | SelectionKey.OP_READ);
        }
        else if (readResult == RW_CLOSE) {
            socketChannel.close();
	    connections.remove(socketChannel);
        }
    }
     } catch (NeedsReadException e) {
        key.interestOps(SelectionKey.OP_READ);
    } catch (NeedsWriteException  e) {
    key.interestOps(SelectionKey.OP_WRITE);
    }
}

}

`

As stated in the documentation, but i when reading, the handshake should occur automatically, but when reading I get encrypted information, approximately this content

���

Selector is not triggering

I'm using tls channel client with selector. If server send packets back to back, selector is usually not triggering.

If WINDOW_UPDATE, PRIORITY, HEADER AND CONTINUATION like the picture below, it's problem.
PROBLEM

If WINDOW_UPDATE, PRIORITY, HEADER AND CONTINUATION like the picture below, it's OK.
OK

Do you have a solution for that?

ClientTLSChannel#read sometimes hangs

Hello

For a project I'm working on, the read method was hanging (no exceptions thrown, just hanging forever). I don't know how to reproduce it, but it was happening consistently on my application when I requested a certain site. It seems to be a race condition, as the issue went away if I ran some println between reads /shrug,

This behavior only happens in 4.0.0, so I have downgraded to 3.2.0 for now.

Call to Class.getMethod causing issue on GraalVM

On https://github.com/marianobarrios/tls-channel/blob/master/src/main/java/tlschannel/util/DirectBufferDeallocator.java#L34, there is a call to Class.getMethod: Class.forName("sun.nio.ch.DirectBuffer").getMethod("cleaner", (Class<?>[]) null). The next line is Class.forName("sun.misc.Cleaner").getMethod("clean").

Is there any particular reason to pass null as the value of the varargs parameter in the first line? It's not incorrect, but I think it's unnecessary, and is causing at least one user problems when used with GraalVM. See https://jira.mongodb.org/browse/JAVA-4309 (the MongoDB Java driver vendors this library), and the resulting GraalVM issue at oracle/graal#3815.

Hopefully the GraalVM issue will be fixed, but I'd like to work around it by removing the null parameter in our vendored copy of your library, and upstream the change here if you're willing. What do you think?

NonBlockingClient example

I'm trying to write a non blocking client but when trying to read I keep getting a NeedsReadException which doesn't make sense as I understand. Probably I'm doing something wrong, would it be possible to provide a NonBlockingClient example as well that I could just follow.

ClientTlsChannel.Builder.withEngineFactory?

ServerTlsChannel.Builder has .withEngineFactory - is there a particular reason why ClientTlsChannel.Builder doesn't? (Like, is it not safe, or broken, or something? Or, just hasn't been done?)

Unable to run SimpleBlockingClient and Server

Dear Marian,
While we are trying to run SimpleBlockingClient ,we are getting error in server at read method.

Exception in thread "main" tlschannel.TlsChannelCallbackException: SSLEngine creation callback failed
at tlschannel.ServerTlsChannel.initEngine(ServerTlsChannel.java:350)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:262)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:272)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:277)
at tlschannel.example.SimpleBlockingServer.main(SimpleBlockingServer.java:50)
Caused by: java.lang.IllegalStateException: SSLContextImpl is not initialized
at sun.security.ssl.SSLContextImpl.engineCreateSSLEngine(SSLContextImpl.java:191)
at javax.net.ssl.SSLContext.createSSLEngine(SSLContext.java:329)
at tlschannel.ServerTlsChannel.defaultSSLEngineFactory(ServerTlsChannel.java:88)
at tlschannel.ServerTlsChannel.access$1(ServerTlsChannel.java:87)
at tlschannel.ServerTlsChannel.initEngine(ServerTlsChannel.java:347)
... 4 more

Spin Loop when underlying channel is closed

Hi @marianobarrios, thanks for providing this very useful library!

I try to use it for a https proxy and encountered the following problem: When the wrapped socket was closed while someone still wants to emit data, the TlsChannelImpl.wrapAndWrite(ByteBufferSet) seems to hang in a endless loop. Example stack dump:

java.lang.Thread.State: RUNNABLE
at sun.security.ssl.SSLEngineImpl.wrap([email protected]/SSLEngineImpl.java:146)
at sun.security.ssl.SSLEngineImpl.wrap([email protected]/SSLEngineImpl.java:123)
at tlschannel.impl.TlsChannelImpl.callEngineWrap(TlsChannelImpl.java:411)
at tlschannel.impl.TlsChannelImpl.wrapLoop(TlsChannelImpl.java:393)
at tlschannel.impl.TlsChannelImpl.wrapAndWrite(TlsChannelImpl.java:383)
at tlschannel.impl.TlsChannelImpl.write(TlsChannelImpl.java:368)
at tlschannel.ServerTlsChannel.write(ServerTlsChannel.java:291)
at tlschannel.ServerTlsChannel.write(ServerTlsChannel.java:296)
at tlschannel.ServerTlsChannel.write(ServerTlsChannel.java:301)
at <my code>

The log is filled with

Oct 02 07:50:55 ip-172-31-0-148.eu-central-1.compute.internal java[24592]: 2022/10/02 07:50:54.938 TRACE TlsChannelImpl - engine.wrap() result: [status=CLOSED,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]; engine status: NOT_HANDSHAKING; srcBuffer: ByteBufferSet[[java.nio.HeapByteBuffer[pos=14 lim=117 cap=32768]]:0:1], outEncrypted: BufferHolder{name='outEncrypted', allocator=tlschannel.TrackingAllocator@2c83ec10, plainData=false, maxSize=17408, opportunisticDispose=true, buffer=java.nio.DirectByteBuffer[pos=0 lim=17408 cap=17408], lastSize=17408}
Oct 02 07:50:55 ip-172-31-0-148.eu-central-1.compute.internal java[24592]: 2022/10/02 07:50:54.938 TRACE TlsChannelImpl - engine.wrap() result: [status=CLOSED,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]; engine status: NOT_HANDSHAKING; srcBuffer: ByteBufferSet[[java.nio.HeapByteBuffer[pos=14 lim=117 cap=32768]]:0:1], outEncrypted: BufferHolder{name='outEncrypted', allocator=tlschannel.TrackingAllocator@2c83ec10, plainData=false, maxSize=17408, opportunisticDispose=true, buffer=java.nio.DirectByteBuffer[pos=0 lim=17408 cap=17408], lastSize=17408}
Oct 02 07:50:55 ip-172-31-0-148.eu-central-1.compute.internal java[24592]: 2022/10/02 07:50:54.938 TRACE TlsChannelImpl - engine.wrap() result: [status=CLOSED,handshakeStatus=NOT_HANDSHAKING,bytesProduced=0,bytesConsumed=0]; engine status: NOT_HANDSHAKING; srcBuffer: ByteBufferSet[[java.nio.HeapByteBuffer[pos=14 lim=117 cap=32768]]:0:1], outEncrypted: BufferHolder{name='outEncrypted', allocator=tlschannel.TrackingAllocator@2c83ec10, plainData=false, maxSize=17408, opportunisticDispose=true, buffer=java.nio.DirectByteBuffer[pos=0 lim=17408 cap=17408], lastSize=17408}

I assume that TlsChannelImpl.wrapAndWrite(ByteBufferSet) should also check the closed state of the channel because in this case the source buffer will never be consumed.

Please let me know if I can add any additional information.

client channel reads only first TLS record

when using Selector loop for client channel, if TLS Server sends multiple TLS Records in same TCP packet, we only get the first TLS Record from read method.

tcpdump show packet contains multiple TLS Records

48 2021-08-16 15:23:50.236035636 x.x.x.x -> y.y.y.y TLSv1.2 1391 Application Data, Application Data, Application Data

                            TLSv1.2 Record Layer: Application Data Protocol: Application Data
                                Content Type: Application Data (23)
                                Version: TLS 1.2 (0x0303)
                                Length: 173
                                Encrypted Application Data: e0e5033ea1811614857cb954f51fa26e21919788d611f895...
                            TLSv1.2 Record Layer: Application Data Protocol: Application Data
                                Content Type: Application Data (23)
                                Version: TLS 1.2 (0x0303)
                                Length: 173
                                Encrypted Application Data: e0e5033ea181161522c96bca30dde18cd7ad32e352c874bc...
                            TLSv1.2 Record Layer: Application Data Protocol: Application Data
                                Content Type: Application Data (23)
                                Version: TLS 1.2 (0x0303)
                                Length: 964
                                Encrypted Application Data: e0e5033ea181161636ff5acc89b1cddf97ec288eb3f3e204...

here in the log you can see it reads 1325 from rawsocket, but then sends only 149 bytes, which would be just the first TLS record

08-16-2021 15:23:50,236 TRACE [TlsChannelImpl] Read from channel; response: 1325, buffer: java.nio.DirectByteBuffer[pos=1325 lim=4096 cap=4096]
08-16-2021 15:23:50,237 TRACE [TlsChannelImpl] engine.unwrap() result [status=OK,handshakeStatus=NOT_HANDSHAKING,bytesProduced=149,bytesConsumed=178]. Engine status: NOT_HANDSHAKING; inEncrypted tlschannel.impl.BufferHolder@41ec220d; inPlain: ByteBufferSet[array=[java.n
io.HeapByteBuffer[pos=149 lim=4096 cap=4096]], offset=0, length=1]
08-16-2021 15:23:50,237 TRACE [Connection] Total Bytes read from TLS Buffer: 149

Java 8: NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;

The method ByteBuffer#flip on Java 8 returns a java.nio.Buffer, not a java.nio.ByteBuffer.

java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
	at tlschannel.impl.TlsChannelImpl.callEngineUnwrap(TlsChannelImpl.java:302)
	at tlschannel.impl.TlsChannelImpl.unwrapLoop(TlsChannelImpl.java:258)
	at tlschannel.impl.TlsChannelImpl.readAndUnwrap(TlsChannelImpl.java:592)
	at tlschannel.impl.TlsChannelImpl.handshakeLoop(TlsChannelImpl.java:566)
	at tlschannel.impl.TlsChannelImpl.writeAndHandshake(TlsChannelImpl.java:544)
	at tlschannel.impl.TlsChannelImpl.doHandshake(TlsChannelImpl.java:514)
	at tlschannel.impl.TlsChannelImpl.handshake(TlsChannelImpl.java:487)
	at tlschannel.impl.TlsChannelImpl.read(TlsChannelImpl.java:165)
	at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:266)
	at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:271)
	at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:276)

TLS Channel non-blocking is not working right while blocking mode works

Thanks for a great library with easy to use interface.

 I tried non-blocking, https://github.com/marianobarrios/tls-channel/blob/master/src/test/scala/tlschannel/example/NonBlockingClient.java. It works for reading short stream. For long stream, it does not read complete stream. Sometimes, I got NeedsReadException. Note that, the channel is running in its own thread, and the connection is always connected, and it did not close by the peer.

I tried blocking example (https://github.com/marianobarrios/tls-channel/blob/master/src/test/scala/tlschannel/example/SimpleBlockingClient.java) , it works perfectly.

Any thought?

Here's the codes: (blocking) - works

private void tlsBlockingRun () {
     // initialize the SSLContext, a configuration holder, reusable object
     ByteBuffer requestBuffer = sendAuthenticationRequestTls();
     ByteBuffer responseBuffer = ByteBuffer.allocate(initialReadBufferSizeBytes); 
     responseBuffer.order(ByteOrder.LITTLE_ENDIAN);
     ByteArrayOutputStream accumulatedData = new ByteArrayOutputStream();
     boolean requestSent = false;

     try {
         SSLContext sslContext = SSLContext.getDefault();

         // connect raw socket channel normally
         try (SocketChannel rawChannel = SocketChannel.open()) {
             connected = rawChannel.connect(new InetSocketAddress(host,port));

             // create TlsChannel builder, combining the raw channel and the SSLEngine, using minimal
             // options
             ClientTlsChannel.Builder builder = ClientTlsChannel.newBuilder(rawChannel, sslContext);

             // instantiate TlsChannel
             try (TlsChannel tlsChannel = builder.build()) {

                 int c;
                 while (requestBuffer.remaining() > 0) {
                     tlsChannel.write(requestBuffer);
                 }
                 Trace.debug ("sent AuthenticationRequest");
                 // being HTTP 1.0, the server will just close the connection at the end
                 
                 while ((c = tlsChannel.read(responseBuffer)) != -1) {
                     if (c > 0) {
                         Trace.debug ("read " + c + " bytes");
                         responseBuffer.flip();
                         byte[] bytesFromBuffer = new byte[c];
                         responseBuffer.get(bytesFromBuffer);
                         accumulatedData.write(bytesFromBuffer);
                         responseBuffer.clear();
                         processAccumulatedData(accumulatedData);
                     } else {
                         Trace.debug ("read return " + c);
                     }
                 }
                 Trace.debug ("Out of the loop");
             }
         }
     } catch (IOException | NoSuchAlgorithmException | InterruptedException ex) {
         Trace.debug ("Exception ... ");
     } 
     
 }

non-Blocking code - does not work (did not read the complete stream)

private void tlsNonBlockingRun() {
       ByteBuffer requestBuffer = sendAuthenticationRequestTls();
       ByteBuffer responseBuffer = ByteBuffer.allocate(initialReadBufferSizeBytes); // use small buffer to cause selector loops
       responseBuffer.order(ByteOrder.LITTLE_ENDIAN);
       ByteArrayOutputStream accumulatedData = new ByteArrayOutputStream();
       boolean requestSent = false;

       try {
       // initialize the SSLContext, a configuration holder, reusable object
       SSLContext sslContext = SSLContext.getDefault();

       Selector selector = Selector.open();

       // connect raw socket channel normally
       try (SocketChannel rawChannel = SocketChannel.open()) {
           rawChannel.configureBlocking(false);
           rawChannel.connect(new InetSocketAddress(host,port));

           // Note that the raw channel (and not the wrapped one) is registered in the selector
           rawChannel.register(selector, SelectionKey.OP_CONNECT);

           // create TlsChannel builder, combining the raw channel and the SSLEngine, using minimal
           // options
           ClientTlsChannel.Builder builder = ClientTlsChannel.newBuilder(rawChannel, sslContext);

           // instantiate TlsChannel
           try (TlsChannel tlsChannel = builder.build()) {
               
               mainloop:
               while (true) {
                   // loop blocks here
                   selector.select(500);

                   Iterator<SelectionKey> iterator = selector.selectedKeys().iterator();
                   while (iterator.hasNext()) {

                       SelectionKey key = iterator.next();
                       iterator.remove();

                       if (key.isConnectable()) {
                           if (rawChannel.finishConnect()) {
                               // the channel is registered for writing, because TLS connections are initiated by
                               // clients.
                               rawChannel.register(selector, SelectionKey.OP_WRITE);
                               connected = true;
                           }

                       } else if (key.isReadable() || key.isWritable()) {
                           try {
                               if (!requestSent) {
                                   // do HTTP request
                                   tlsChannel.write(requestBuffer);
                                   if (requestBuffer.remaining() == 0) {
                                       requestSent = true;
                                   }
                               } else {
                                   int c = tlsChannel.read(responseBuffer);
                                   if (c > 0) {
                                       responseBuffer.flip();
                                       byte[] bytesFromBuffer = new byte[c];
                                       responseBuffer.get(bytesFromBuffer);
                                       accumulatedData.write(bytesFromBuffer);
                                       responseBuffer.clear();
                                       processAccumulatedData(accumulatedData);
                                   }
                                   if (c < 0) {
                                       tlsChannel.close();
                                       break mainloop;
                                   }
                               }
                           } catch (NeedsReadException e) {
                               key.interestOps(SelectionKey.OP_READ); // overwrites previous value
                               Trace.debug ("NeedsReadException");
                           } catch (NeedsWriteException e) {
                               key.interestOps(SelectionKey.OP_WRITE); // overwrites previous value
                               Trace.debug ("NeedsWriteException");
                           } catch (InterruptedException e) {
                               Trace.debug ("InteruptedExeception");
                               Trace.debug ("InteruptedException");
                           }
                       } else {
                           throw new IllegalStateException();
                       }
                   }
               }
           }
       }
       } catch (IOException | NoSuchAlgorithmException ex) {

       }
       
   }

remove slf4j dependency?

it is causing us problems because we use tls-channel together with https://github.com/teragrep/rlp_01 which is then used within logback i.e. https://github.com/teragrep/jla_01 etc logging frameworks which themselves are implementation backends for slf4j. this causes a circular problem because slf4j provider is not yet available when tls-channel tries to use it.

it causes version dependency with slf4j on the logging framework side as well.

please see another justification from jwtk/jjwt#34

TLS Termination

I currently use HAProxy in front of RabbitMQ and MongoDB to do TLS termination. I then use a java based load balancer to handle http termination for websocket. I prefer the Java route because it is more flexible, and would love to combine the two.

Let's say I have an insecure server running on tcp://host_foo:5555. Is it possible to use this library to perform TLS termination on tls://host_bar:6555 and then insecurely tunnel the traffic to host_foo?

In other words:

[xyc_client] <-- secure tcp (tls) --> [tls-channel-server] <-- insecure tcp --> [xyc_server]

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Configuration option packageRules[0].minimumReleaseAge should be a string

Static Stackless Flow Control Exceptions

Have you considered using static exceptions for flow control like:

static final class StacklessException extends Exception {
    public StacklessException(String msg) { super(msg); }
    public Throwable fillInStackTrace() { return this; }
}
static final StacklessException NEEDS_WRITE_EXCEPTION = new StacklessException("NEEDS_WRITE_EXCEPTION");

... then in your code just throw it without calling new ...

    if (c == 0)
        throw NEEDS_WRITE_EXCEPTION;

As you know creating exceptions with new is literally 100x more expensive than creating a regular Object. Even with overriding fillInStackTrace it's still like 20x more expensive. If you use a static instance, there is virtually zero performance penalty.

You have quite a few flow-control exceptions that don't hold state so they're all candidates for static instances. And there might be some that are holding state that is not critical in which case you could drop the state and go static.

Just a thought. Nice project.

TlsChannel does not indicate channel as ready for I/ O operation in case less reads than available are made

I use a scenario where I receive data from a client connection as follows

int nReady = selector.select(this.readTimeout);
        if (nReady == 0) {
            throw new TimeoutException("read timed out");
        }
Set<SelectionKey> polledEvents = this.selector.selectedKeys();
Iterator<SelectionKey> eventIter = polledEvents.iterator();
while (eventIter.hasNext()) {
            SelectionKey currentKey = eventIter.next();
            System.err.println("currentKey <" + currentKey + ">");
            // tlsChannel needs to know about both
            if (currentKey.isReadable() || currentKey.isWritable()) {
                try {
                    readBytes = tlsChannel.read(byteBuffer);
}
} catch (Exception e) {
// something
}
eventIter.remove();
}

If server has sent a with multiple calls to write or with an array of buffers, does not differ:

                for (ByteBuffer byteBuffer : byteBufferList) {
                    long bytesWritten = establishedContext.socket().write(new ByteBuffer[] {
                            byteBuffer
                    });
                    LOGGER.info("wrote <{}>", bytesWritten);
                }

then tlsChannel is read only once and it does not trigger ready operation in the next invocation to selector.select. the data is unavailable and lost, however if the client code is changed so that:

while (true) {
readBytes = tlsChannel.read(byteBuffer);
if (readBytes <= 0) {
break;
}
}

all data is available and read, however expected behaviour is that selector would be ready immediately as there is still data not read. this change does not comform my needs because client buffers may be smaller than send buffers, however in the where we see the abnormal behviour they are larger.

How to Contribute

Hi @marianobarrios this library is really great and saved me tons of times. Now that I am thinking of some changes that is also useful to be applied, but didn't see anywhere on how I can contribute. Just wondering could you please provide some guideline and/or instructions?

multi-threading example

I created a multi-threading version of a NIO server application here https://github.com/teragrep/rlp_03/blob/multi-thread/src/main/java/com/teragrep/rlp_03/SocketProcessor.java#L109

However I can't simply get around the idea how the tls-channel would fit into the picture because I offload the connection processing after the accepting and creating the socket (runAcceptSelector) to dedicated thread selectors (runMessageSelector) which are interested in their own share of sockets.

Would it be possible to get consulting on the matter?

NeedsTaskException.getTask() returns null object on read operation

Hi Mariano,
I just wanted to say a big thanks for the very well done tls-channel lib.
I've been developing a server backend for our PvP mobile game for the last 3 years using tls-channel. Right now we are close to release and I started testing the server with simulated heavy load and the server started hanging. Unfortunately, it's hard to recreate the issue. Sometimes it happens after 7 hours of running under heavy load and sometimes after 12 hours.

This is the info I have at the moment:

  • Using tls-channel 0.7.0 in async mode with:
    ServerTlsChannel.newBuilder(socketChannel, sslContext).withRunTasks(false).build();
  • I'm offloading NeedsTaskException.getTask() to a background thread. After the task executes I return to the main thread and retry the operation (read or write)

What happens:

  1. I'm doing a Read operation.
  2. I get a NeedsTaskException
  3. The getTask() method returns null. After that, what I see from the logs is there are more NeedsTaskException for other channels and getTask() returns null for them too.

The main thread goes in a loop and stays in the loop even after I stop all simulated clients from trying to send traffic.

The server logs show that after the first null result from getTask(), the method starts returning null for other channels too.
Also, it looks like the Read method returns the same bytes for some (or all channels?), because the main thread keeps handling messages even though I have stopped all simulated traffic to the server.

If you have any suggestions how to further debug the issue I can run the tests again.
Here's the Read method

private void read(final SelectionKey key)
{
  final HPSClient client = (HPSClient)key.attachment();
  
  //System.out.println("READ...");
  try
  {
	  while(true)
	  {
		  readBuffer.clear();

		  final int numRead = client.hpsTlsChannel.read(readBuffer);
		 
		  if(numRead < 1)
		  {
			  if(numRead == -1)
			  {
				  killKey(key, client);
			  }
			  
			  return;
		  }
		  
		  final HPSMessage msg = hpsMsgContainer.getMessage(HPSMessage.MSG_PROTOCOL_READ_DATA, client, numRead);
		  
		  readBuffer.flip();
		  msg.data.put(readBuffer);
		  msg.data.flip();
		  
		  eventSystem.sendMessage(msg);
	  }
  }
  catch (final NeedsReadException ex) 
  {
	  //System.out.println("NeedsReadException...");
	  
	  // In some very rare cases we may need to write
	  if(client.hpsGetWriteQueue().peek() != null)
	  {
		  key.interestOps(SelectionKey.OP_WRITE);
	  }
	  else
	  {
		  key.interestOps(SelectionKey.OP_READ);
	  }
  } 
  catch (final NeedsWriteException ex) 
  {
	  //System.out.println("NeedsWriteException...");
	  key.interestOps(SelectionKey.OP_WRITE);
  }
  catch(final WouldBlockException ex)
  {
	  // Wait for the channel to become ready - do not change key.interestOps
  }
  catch (final NeedsTaskException ex) 
  {
	  final var task = ex.getTask();
	  
	  if(task == null) 
	  {
		  System.out.println("NeedsTaskException getTask() is null");
		  return;
	  }
	  
	  //System.out.println("NeedsTaskException...");
	  final HPSMessage msg = hpsMsgContainer.getMessage(HPSMessage.MSG_EVENT_EXEC_SSL_TASK, client);
	  msg.task = task;
	  
	  eventSystem.sendMessage(msg);
  }
  catch(final IOException ex) 
  {
	  //System.out.println("IO EX: " + ex);
	  //ex.printStackTrace();
	  killKey(key, client);
  }
}

IllegalStateException: Handshake has already been started

Hi,
thanks for creating this great library which supports developers to create secure software.

Version 0.8.1

Expected Behavior When I execute openssl s_client -connect $IP:$PORT to examine the example code of the non-blocking server works as expected and I can send messages to the example program.

Unexpected Behavior
But when I use the same example - except the SSLEngine setup: I used a different Certificate created via BouncyCastle - in an Android app the following Exception occurs.

Exception

java.lang.IllegalStateException: Handshake has already been started at com.android.org.conscrypt.OpenSSLEngineImpl.beginHandshakeInternal(OpenSSLEngineImpl.java:335)
at com.android.org.conscrypt.OpenSSLEngineImpl.beginHandshake(OpenSSLEngineImpl.java:325)
at tlschannel.impl.TlsChannelImpl.doHandshake(TlsChannelImpl.java:502)
at tlschannel.impl.TlsChannelImpl.handshake(TlsChannelImpl.java:485)
at tlschannel.impl.TlsChannelImpl.read(TlsChannelImpl.java:163)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:266)
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:271) 
at tlschannel.ServerTlsChannel.read(ServerTlsChannel.java:276)

As far as I understood, what seems to happen is that there is a read() which throws a NeedsReadException inside writeToChannel(), then the exception bubbles up to doHandshake( false) and therefore skips the rest of the try block and so in the next execution of tlsChannel.read(...) the code tries to begin the handshake again and the SSLEngine complains.

Excerpt from TlsChannelImpl.java:492

private void doHandshake(boolean force) throws IOException, EofException {
     if (!force && negotiated) {
         return;
     }
     try {
            if (invalid || shutdownSent) {
                throw new ClosedChannelException();
            }
            if (force || !negotiated) {
                logger.log(Level.FINEST, "Calling SSLEngine.beginHandshake()");
                engine.beginHandshake();   // <-- this is called the first time and then after the NeedsReadException when we run into the next read(...) call, its executed the second time which leads to the ISE
                writeAndHandshake();      // <-- here a NeedsReadException is thrown so we jump to the finally block

                if (engine.getSession().getProtocol().startsWith("DTLS")) {
                    throw new IllegalArgumentException("DTLS not supported");
                }

                // call client code
                try {
                    initSessionCallback.accept(engine.getSession());
                } catch (Exception e) {
                    logger.log(Level.FINEST, "client code threw exception in session initialization callback", e);
                    throw new TlsChannelCallbackException("session initialization callback failed", e);
                }
                negotiated = true;
        } finally {
            initLock.unlock();
        }
}

Initial Buffer Size

Question,

in class TlsChannelImpl(), there is a buffersInitialSize = 4096;
i have debugged and found that it always much larger than 4096...
should the initial buffer size come from:

SSLSession session = engine.getSession();
int networkBufferSize = session.getPacketBufferSize();
int minimumApplicationBufferSize = session.getApplicationBufferSize();

I did try it, it worked of course, and i didnt see resize called once

i made inEncrypted and outEncrypted buffers the networkBufferSize
and the inPlain buffer minimumApplicationBufferSize

or is this not important..

Mitch

Alternative to DirectBufferDeallocator

Hi,
I want to use this library code, but my JVM doesn't have "sun.misc" available
I'm locked in to JVM 1.8 (embedded device)
any suggestions?

i changed this code in class DirectBufferAllocator just to make it run

`@Override
public void free(ByteBuffer buffer) {

// GC does it
buffer = null;
  
// this does not work in NX MASTER
// do not wait for GC (and finalizer) to run
//deallocator.deallocate(buffer);

}`

dont think this is a solution...
memory just draining too

(0000177582) Memory Available = 399114240 <380928>
(0000178600) Memory Available = 398606336 <507904>
(0000179599) Memory Available = 398098432 <507904>
(0000180600) Memory Available = 397590528 <507904>
(0000181600) Memory Available = 397209600 <380928>
(0000182584) Memory Available = 396828672 <380928>
(0000183600) Memory Available = 396320768 <507904>
(0000184599) Memory Available = 395812864 <507904>
(0000185600) Memory Available = 395431936 <380928>
and so on

i see the buffer(s) are constantly being created/freed
that make sense?

thanks
Mitch

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v4
  • actions/setup-java v4
gradle
build.gradle
  • com.diffplug.spotless 6.25.0
  • com.github.spotbugs 6.0.20
  • org.slf4j:jul-to-slf4j 2.0.16
  • ch.qos.logback:logback-classic 1.3.14
  • org.junit.jupiter:junit-jupiter-api 5.11.0
  • org.junit.jupiter:junit-jupiter-engine 5.11.0
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.10

  • Check this box to trigger a request for Renovate to run again on this repository

When using SniSslContextStrategy non tls connections will hang indefinitely

If using the FixedSslContextStrategy, non tls connections will terminate. EX:

ServerTlsChannel.Builder builder = ServerTlsChannel.newBuilder(rawChannel, sslContext);

Curl output:

❯ curl http://localhost:8282/ curl: (7) Failed to connect to localhost port 8282: Connection refused

If I change the same builder to the following, curl will hang indefinitely:
ServerTlsChannel.Builder builder = ServerTlsChannel.newBuilder(rawChannel, sniIOp-> Optional.of(sslContext));

I think this is caused by a NeedsReadException thrown in the readFromChannel mehtod in TlsChannelImpl during the initEngine call.

To remedy this I created a nasty hack on my end that detects the NeedsReadException and throws a ClosedChannelException. See below

package test.channel;

import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.nio.channels.ByteChannel;
import java.nio.channels.ClosedChannelException;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.function.Consumer;

import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLSession;

import tlschannel.NeedsReadException;
import tlschannel.ServerTlsChannel;
import tlschannel.TlsChannel;
import tlschannel.TrackingAllocator;
import tlschannel.impl.ByteBufferSet;
import tlschannel.impl.TlsChannelImpl;
import tlschannel.impl.TlsChannelImpl.EofException;

public class ServerTlsChannelFix implements TlsChannel {

	private ServerTlsChannel delegate;

	public ServerTlsChannelFix(ServerTlsChannel serverTlsChannel) {
		this.delegate = Objects.requireNonNull(serverTlsChannel);
	}

	public SSLContext getSslContext() {
		return delegate.getSslContext();
	}

	@Override
	public long read(ByteBuffer[] dstBuffers, int offset, int length) throws IOException {
		ByteBufferSet dest = new ByteBufferSet(dstBuffers, offset, length);
		TlsChannelImpl.checkReadBuffer(dest);
		if (!isSniRead()) {
			try {
				initEngine();
			} catch (EofException e) {
				return -1;
			}
		}
		return getImpl().read(dest);
	}

	@Override
	public long write(ByteBuffer[] srcs, int offset, int length) throws IOException {
		ByteBufferSet source = new ByteBufferSet(srcs, offset, length);
		if (!isSniRead()) {
			try {
				initEngine();
			} catch (EofException e) {
				throw new ClosedChannelException();
			}
		}
		return getImpl().write(source);
	}

	@Override
	public void renegotiate() throws IOException {
		if (!isSniRead()) {
			try {
				initEngine();
			} catch (EofException e) {
				throw new ClosedChannelException();
			}
		}
		getImpl().renegotiate();
	}

	@Override
	public void handshake() throws IOException {
		if (!isSniRead()) {
			try {
				initEngine();
			} catch (EofException e) {
				throw new ClosedChannelException();
			}
		}
		getImpl().handshake();
	}

	// hax

	private static final Field ServerTlsChannel_sniRead_FIELD = unchecked(() -> {
		for (var field : ServerTlsChannel.class.getDeclaredFields()) {
			if (!"sniRead".equals(field.getName()))
				continue;
			if (!boolean.class.isAssignableFrom(field.getType()))
				continue;
			field.setAccessible(true);
			return field;
		}
		throw new NoSuchElementException();
	});

	protected boolean isSniRead() {
		return (boolean) unchecked(() -> ServerTlsChannel_sniRead_FIELD.get(delegate));
	}

	private static final Field ServerTlsChannel_impl_FIELD = unchecked(() -> {
		for (var field : ServerTlsChannel.class.getDeclaredFields()) {
			if (!"impl".equals(field.getName()))
				continue;
			if (!TlsChannelImpl.class.isAssignableFrom(field.getType()))
				continue;
			field.setAccessible(true);
			return field;
		}
		throw new NoSuchElementException();
	});

	protected TlsChannelImpl getImpl() {
		return (TlsChannelImpl) unchecked(() -> ServerTlsChannel_impl_FIELD.get(delegate));
	}

	private static final Method ServerTlsChannel_initEngine_METHOD = unchecked(() -> {
		for (var meth : ServerTlsChannel.class.getDeclaredMethods()) {
			if (!"initEngine".equals(meth.getName()))
				continue;
			if (!Void.TYPE.equals(meth.getReturnType()))
				continue;
			if (meth.getParameterCount() != 0)
				continue;
			meth.setAccessible(true);
			return meth;
		}
		throw new NoSuchElementException();
	});

	protected void initEngine() throws IOException, EofException {
		try {
			ServerTlsChannel_initEngine_METHOD.invoke(delegate);
		} catch (Throwable t) {
			if (t instanceof InvocationTargetException && t.getCause() != null)
				t = t.getCause();
			if (t instanceof NeedsReadException)
				throw new ClosedChannelException();
			if (t instanceof EofException)
				throw (EofException) t;
			if (t instanceof IOException)
				throw (IOException) t;
			throw (((Object) t) instanceof java.lang.RuntimeException) ? java.lang.RuntimeException.class.cast(t)
					: new RuntimeException(t);
		}
	}

	private static <X> X unchecked(Callable<X> callable) {
		Objects.requireNonNull(callable);
		try {
			return callable.call();
		} catch (Exception e) {
			throw (((Object) e) instanceof java.lang.RuntimeException) ? java.lang.RuntimeException.class.cast(e)
					: new RuntimeException(e);
		}
	}

	// delegates

	@Override
	public int hashCode() {
		return delegate.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		return delegate.equals(obj);
	}

	@Override
	public ByteChannel getUnderlying() {
		return delegate.getUnderlying();
	}

	@Override
	public SSLEngine getSslEngine() {
		return delegate.getSslEngine();
	}

	@Override
	public Consumer<SSLSession> getSessionInitCallback() {
		return delegate.getSessionInitCallback();
	}

	@Override
	public boolean getRunTasks() {
		return delegate.getRunTasks();
	}

	@Override
	public TrackingAllocator getPlainBufferAllocator() {
		return delegate.getPlainBufferAllocator();
	}

	@Override
	public TrackingAllocator getEncryptedBufferAllocator() {
		return delegate.getEncryptedBufferAllocator();
	}

	@Override
	public long read(ByteBuffer[] dstBuffers) throws IOException {
		return delegate.read(dstBuffers);
	}

	@Override
	public int read(ByteBuffer dstBuffer) throws IOException {
		return delegate.read(dstBuffer);
	}

	@Override
	public long write(ByteBuffer[] srcs) throws IOException {
		return delegate.write(srcs);
	}

	@Override
	public int write(ByteBuffer srcBuffer) throws IOException {
		return delegate.write(srcBuffer);
	}

	@Override
	public void close() throws IOException {
		delegate.close();
	}

	@Override
	public String toString() {
		return delegate.toString();
	}

	@Override
	public boolean isOpen() {
		return delegate.isOpen();
	}

	@Override
	public boolean shutdown() throws IOException {
		return delegate.shutdown();
	}

	@Override
	public boolean shutdownReceived() {
		return delegate.shutdownReceived();
	}

	@Override
	public boolean shutdownSent() {
		return delegate.shutdownSent();
	}
}

Trouble getting TLS connection 2nd time

So how im using this is, i get a standard socket connected
then i switch over to TLS via tlsChannel = ClientTlsChannel.newBuilder(socketChannel, _sslContext).withRunTasks(false).build();
and it all works... i successfully get a TLS secured socket
but if i try to disconnect, and start over it fails
to disconnect i just do a close on the socket (java.nio.channels.SocketChannel .close())
then wait... and restart the process, i get socket connected, but cant get the tlschannel going
its also very hard to debug :)
it also happens if i disconnect the device (pull ethernet out), the socket does close, and code tries to get it going,
socket connects, but tls channel fails....
do i need to do anything with tlschannel to have it ready for another connection?
i wait 15 seconds after disconnect, before retry

ok, while debugging, it sometimes works.... so there is some delay, that i need
this one gonna be hard to figure out :(

i'll keep at it, and if you have any ideas.... toss em in

thanks
mitch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.