PromiscuousTrustManager implements X509TrustManager { public static PromiscuousTrustManager createPromiscuousTrustManager() { return new PromiscuousTrustManager(); } private  PromiscuousTrustManager(); static PromiscuousTrustManager createPromiscuousTrustManager(); X509Certificate[] getAcceptedIssuers( ); void checkClientTrusted( final X509Certificate[] certs, final String authType ); void checkServerTrusted( final X509Certificate[] certs, final String authType );  }
@Test public void createPromiscuousTrustManager() throws CertificateException, IOException { final ResourceBundle bundle = ResourceBundle.getBundle( PromiscuousTrustManagerTest.class.getName() ); final String cert1data = bundle.getString( "cert1" ); final X509Certificate cert1 = X509Utils.certificateFromBase64( cert1data ); final X509TrustManager trustManager = PromiscuousTrustManager.createPromiscuousTrustManager(); final X509Certificate[] certificates = new X509Certificate[] { cert1, }; trustManager.checkServerTrusted( certificates, "test" ); }