@Test void checkServerTrusted_noBundleForTrustDomain_ThrowCertificateException() throws BundleNotFoundException { acceptedSpiffeIds = Collections.singleton(SpiffeId.parse("spiffe: when(bundleSource.getBundleForTrustDomain(TrustDomain.of("example.org"))).thenThrow(new BundleNotFoundException("Bundle not found")); try { spiffeTrustManager.checkServerTrusted(chain, ""); fail(); } catch (CertificateException e) { assertEquals("Bundle not found", e.getMessage()); } }
@Override public void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType) throws CertificateException { validatePeerChain(chain); }
SpiffeTrustManager extends X509ExtendedTrustManager { @Override public void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType) throws CertificateException { validatePeerChain(chain); } }
SpiffeTrustManager extends X509ExtendedTrustManager { @Override public void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType) throws CertificateException { validatePeerChain(chain); } SpiffeTrustManager(@NonNull final BundleSource<X509Bundle> x509BundleSource,
                              @NonNull final Supplier<Set<SpiffeId>> acceptedSpiffeIdsSupplier);  SpiffeTrustManager(@NonNull final BundleSource<X509Bundle> x509BundleSource); }
SpiffeTrustManager extends X509ExtendedTrustManager { @Override public void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType) throws CertificateException { validatePeerChain(chain); } SpiffeTrustManager(@NonNull final BundleSource<X509Bundle> x509BundleSource,
                              @NonNull final Supplier<Set<SpiffeId>> acceptedSpiffeIdsSupplier);  SpiffeTrustManager(@NonNull final BundleSource<X509Bundle> x509BundleSource); @Override void checkClientTrusted(@NonNull final X509Certificate[] chain, final String authType); @Override void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType); @Override X509Certificate[] getAcceptedIssuers(); @Override void checkClientTrusted(@NonNull final X509Certificate[] chain, final String authType, final Socket socket); @Override void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType, final Socket socket); @Override void checkClientTrusted(@NonNull final X509Certificate[] chain, final String authType, final SSLEngine sslEngine); @Override void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType, final SSLEngine sslEngine); }
SpiffeTrustManager extends X509ExtendedTrustManager { @Override public void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType) throws CertificateException { validatePeerChain(chain); } SpiffeTrustManager(@NonNull final BundleSource<X509Bundle> x509BundleSource,
                              @NonNull final Supplier<Set<SpiffeId>> acceptedSpiffeIdsSupplier);  SpiffeTrustManager(@NonNull final BundleSource<X509Bundle> x509BundleSource); @Override void checkClientTrusted(@NonNull final X509Certificate[] chain, final String authType); @Override void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType); @Override X509Certificate[] getAcceptedIssuers(); @Override void checkClientTrusted(@NonNull final X509Certificate[] chain, final String authType, final Socket socket); @Override void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType, final Socket socket); @Override void checkClientTrusted(@NonNull final X509Certificate[] chain, final String authType, final SSLEngine sslEngine); @Override void checkServerTrusted(@NonNull final X509Certificate[] chain, final String authType, final SSLEngine sslEngine);  }