@Test void engineGetTrustManagersAcceptAnySpiffeId() throws NoSuchFieldException, IllegalAccessException { X509Source source = new X509SourceStub(); TrustManager[] trustManagers = new SpiffeTrustManagerFactory().engineGetTrustManagersAcceptAnySpiffeId(source); SpiffeTrustManager trustManager = (SpiffeTrustManager) trustManagers[0]; boolean acceptAny = isAcceptAny(trustManager); assertTrue(acceptAny); }
public TrustManager[] engineGetTrustManagersAcceptAnySpiffeId(@NonNull final BundleSource<X509Bundle> x509BundleSource) { val spiffeTrustManager = new SpiffeTrustManager(x509BundleSource); return new TrustManager[]{spiffeTrustManager}; }
SpiffeTrustManagerFactory extends TrustManagerFactorySpi { public TrustManager[] engineGetTrustManagersAcceptAnySpiffeId(@NonNull final BundleSource<X509Bundle> x509BundleSource) { val spiffeTrustManager = new SpiffeTrustManager(x509BundleSource); return new TrustManager[]{spiffeTrustManager}; } }
SpiffeTrustManagerFactory extends TrustManagerFactorySpi { public TrustManager[] engineGetTrustManagersAcceptAnySpiffeId(@NonNull final BundleSource<X509Bundle> x509BundleSource) { val spiffeTrustManager = new SpiffeTrustManager(x509BundleSource); return new TrustManager[]{spiffeTrustManager}; }  }
SpiffeTrustManagerFactory extends TrustManagerFactorySpi { public TrustManager[] engineGetTrustManagersAcceptAnySpiffeId(@NonNull final BundleSource<X509Bundle> x509BundleSource) { val spiffeTrustManager = new SpiffeTrustManager(x509BundleSource); return new TrustManager[]{spiffeTrustManager}; }  @Override TrustManager[] engineGetTrustManagers(); TrustManager[] engineGetTrustManagers(@NonNull final BundleSource<X509Bundle> x509BundleSource); TrustManager[] engineGetTrustManagersAcceptAnySpiffeId(@NonNull final BundleSource<X509Bundle> x509BundleSource); TrustManager[] engineGetTrustManagers(
            @NonNull final BundleSource<X509Bundle> x509BundleSource,
            @NonNull final Supplier<Set<SpiffeId>> acceptedSpiffeIdsSupplier); }
SpiffeTrustManagerFactory extends TrustManagerFactorySpi { public TrustManager[] engineGetTrustManagersAcceptAnySpiffeId(@NonNull final BundleSource<X509Bundle> x509BundleSource) { val spiffeTrustManager = new SpiffeTrustManager(x509BundleSource); return new TrustManager[]{spiffeTrustManager}; }  @Override TrustManager[] engineGetTrustManagers(); TrustManager[] engineGetTrustManagers(@NonNull final BundleSource<X509Bundle> x509BundleSource); TrustManager[] engineGetTrustManagersAcceptAnySpiffeId(@NonNull final BundleSource<X509Bundle> x509BundleSource); TrustManager[] engineGetTrustManagers(
            @NonNull final BundleSource<X509Bundle> x509BundleSource,
            @NonNull final Supplier<Set<SpiffeId>> acceptedSpiffeIdsSupplier);  }