@Override
        public void checkServerTrusted(X509Certificate[] chain, String authType)
                throws CertificateException {
            this.origTm.checkServerTrusted(chain, authType);
        }
A trust manager which logs the common name of an expired but otherwise valid (client) certificate before rejecting the connection attempt.
This allows to identify misconfigured clients in complex network environments, where the IP address is not sufficient.
this class wraps a standard trust manager and delegates almost all requests to it, except for cases where an invalid certificate is reported by the
standard trust manager. In this cases this manager checks whether the provided certificate is invalid only due to being expired and logs the common
name if that is the case. This trust manager will always return the results of the wrapped standard trust manager, i.e. return if the certificate is valid
or rethrow the original exception if it is not.
clients/src/main/java/org/apache/kafka/common/security/ssl/CommonNameLoggingTrustManagerFactoryWrapper.java