@Test(expected = CertificateException.class) public void testInvalidChainCAnotTrusted() throws Exception { systemUnderTest.checkClientTrusted( untrustedCAChain, "RSA" ); }
@Override public void checkClientTrusted( X509Certificate[] chain, String authType ) throws CertificateException { final X509Certificate endEntityCert = CertificateUtils.identifyEndEntityCertificate( Arrays.asList( chain ) ); final X509CertSelector selector = new X509CertSelector(); selector.setCertificate( endEntityCert ); try { checkChainTrusted( selector, chain ); } catch ( InvalidAlgorithmParameterException | NoSuchAlgorithmException | CertPathBuilderException ex ) { throw new CertificateException( ex ); } }
OpenfireX509TrustManager implements X509TrustManager { @Override public void checkClientTrusted( X509Certificate[] chain, String authType ) throws CertificateException { final X509Certificate endEntityCert = CertificateUtils.identifyEndEntityCertificate( Arrays.asList( chain ) ); final X509CertSelector selector = new X509CertSelector(); selector.setCertificate( endEntityCert ); try { checkChainTrusted( selector, chain ); } catch ( InvalidAlgorithmParameterException | NoSuchAlgorithmException | CertPathBuilderException ex ) { throw new CertificateException( ex ); } } }
OpenfireX509TrustManager implements X509TrustManager { @Override public void checkClientTrusted( X509Certificate[] chain, String authType ) throws CertificateException { final X509Certificate endEntityCert = CertificateUtils.identifyEndEntityCertificate( Arrays.asList( chain ) ); final X509CertSelector selector = new X509CertSelector(); selector.setCertificate( endEntityCert ); try { checkChainTrusted( selector, chain ); } catch ( InvalidAlgorithmParameterException | NoSuchAlgorithmException | CertPathBuilderException ex ) { throw new CertificateException( ex ); } } OpenfireX509TrustManager( KeyStore trustStore, boolean acceptSelfSigned, boolean checkValidity ); }
OpenfireX509TrustManager implements X509TrustManager { @Override public void checkClientTrusted( X509Certificate[] chain, String authType ) throws CertificateException { final X509Certificate endEntityCert = CertificateUtils.identifyEndEntityCertificate( Arrays.asList( chain ) ); final X509CertSelector selector = new X509CertSelector(); selector.setCertificate( endEntityCert ); try { checkChainTrusted( selector, chain ); } catch ( InvalidAlgorithmParameterException | NoSuchAlgorithmException | CertPathBuilderException ex ) { throw new CertificateException( ex ); } } OpenfireX509TrustManager( KeyStore trustStore, boolean acceptSelfSigned, boolean checkValidity ); @Override void checkClientTrusted( X509Certificate[] chain, String authType ); @Override void checkServerTrusted( X509Certificate[] chain, String authType ); @Override X509Certificate[] getAcceptedIssuers(); }
OpenfireX509TrustManager implements X509TrustManager { @Override public void checkClientTrusted( X509Certificate[] chain, String authType ) throws CertificateException { final X509Certificate endEntityCert = CertificateUtils.identifyEndEntityCertificate( Arrays.asList( chain ) ); final X509CertSelector selector = new X509CertSelector(); selector.setCertificate( endEntityCert ); try { checkChainTrusted( selector, chain ); } catch ( InvalidAlgorithmParameterException | NoSuchAlgorithmException | CertPathBuilderException ex ) { throw new CertificateException( ex ); } } OpenfireX509TrustManager( KeyStore trustStore, boolean acceptSelfSigned, boolean checkValidity ); @Override void checkClientTrusted( X509Certificate[] chain, String authType ); @Override void checkServerTrusted( X509Certificate[] chain, String authType ); @Override X509Certificate[] getAcceptedIssuers();  }