private static SSLEngine createSslEngineForValidation(SslEngineFactory sslEngineFactory, ConnectionMode connectionMode) {
            // Use empty hostname, disable hostname verification
            if (connectionMode == ConnectionMode.SERVER) {
                return sslEngineFactory.createServerSslEngine("", 0);
            } else {
                return sslEngineFactory.createClientSslEngine("", 0, "");
            }
        }
Validator used to verify dynamic update of keystore used in inter-broker communication.
The validator checks that a successful handshake can be performed using the keystore and
truststore configured on this SslFactory.
clients/src/main/java/org/apache/kafka/common/security/ssl/SslFactory.java