public SSLSocket createSSLSocket(final Socket socket) throws IOException {
        final var sf = sslContext.getSocketFactory();
        final var remoteAddress = (InetSocketAddress) socket.getRemoteSocketAddress();
        final var tlsSocket = (SSLSocket) sf.createSocket(socket, remoteAddress.getHostName(), socket.getPort(), true);
        tlsSocket.setUseClientMode(false);
        tlsSocket.setEnabledProtocols(tlsSocket.getSupportedProtocols());
        tlsSocket.setEnabledCipherSuites(tlsSocket.getSupportedCipherSuites());
        tlsSocket.setNeedClientAuth(false);
        return tlsSocket;
    }
Create a SSL socket that wraps the existing socket. This method is called
after the client issued the STARTTLS command.
<p>
Subclasses may override this method to configure the key stores, enabled
protocols/ cipher suites, enforce client authentication, etc.

@param socket the existing server socket
@return a SSLSocket
@throws IOException when creating the socket failed
src/main/java/de/gessnerfl/fakesmtp/smtp/server/BaseSmtpServer.java