private static SSLContextBuilder loadTrustMaterial(SSLContextBuilder builder, final File file,
            final char[] tsp, final TrustStrategy trustStrategy)
                    throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException {
        Args.notNull(file, "Truststore file"); //$NON-NLS-1$
        final KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
        try (FileInputStream instream = new FileInputStream(file)) {
            trustStore.load(instream, tsp);
        }
        return builder.loadTrustMaterial(trustStore, trustStrategy);
    }
Allows any hostname.

@author Marc Savy <msavy@redhat.com>
gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/connectors/ssl/SSLSessionStrategyFactory.java