code: private void handshake() {
          if (engine.getHandshakeStatus() != HandshakeStatus.NOT_HANDSHAKING) {
              // Not all SSLEngine implementations support calling beginHandshake multiple times while a handshake
              // is in progress. See https://github.com/netty/netty/issues/4718.
              return;
          } else {
              if (handshakePromise.isDone()) {
                  // If the handshake is done already lets just return directly as there is no need to trigger it again.
                  // This can happen if the handshake(...) was triggered before we called channelActive(...) by a
                  // flush() that was triggered by a ChannelFutureListener that was added to the ChannelFuture returned
                  // from the connect(...) method. In this case we will see the flush() happen before we had a chance to
                  // call fireChannelActive() on the pipeline.
                  return;
              }
          }
  
          // Begin handshake.
          final ChannelHandlerContext ctx = this.ctx;
          try {
              engine.beginHandshake();
              wrapNonAppData(ctx, false);
          } catch (Throwable e) {
              setHandshakeFailure(ctx, e);
          } finally {
              forceFlush(ctx);
          }
      }
docs: Performs TLS (re)negotiation.