code: private static SslHandler configureSslHandler(SslHandler sslHandler) {
          // Set endpoint identification algorithm so that JDK's default X509TrustManager implementation
          // performs host name checks. Without this, the X509TrustManager implementation will never raise
          // a CertificateException even if the domain name or IP address mismatches.
          final SSLEngine engine = sslHandler.engine();
          final SSLParameters params = engine.getSSLParameters();
          params.setEndpointIdentificationAlgorithm("HTTPS");
          engine.setSSLParameters(params);
          return sslHandler;
      }
docs: Configures the specified {@link SslHandler} with common settings.