@Test void newSource_errorFetchingJwtBundles() { val options = DefaultX509Source.X509SourceOptions .builder() .workloadApiClient(workloadApiClientErrorStub) .spiffeSocketPath("unix:/tmp/test") .build(); try { DefaultX509Source.newSource(options); fail(); } catch (X509SourceException e) { assertEquals("Error creating X.509 source", e.getMessage()); assertEquals("Error in X509Context watcher", e.getCause().getMessage()); } catch (Exception e) { fail(); } }
public static DefaultX509Source newSource() throws SocketEndpointAddressException, X509SourceException { val x509SourceOptions = X509SourceOptions.builder().initTimeout(DEFAULT_TIMEOUT).build(); return newSource(x509SourceOptions); }
DefaultX509Source implements X509Source { public static DefaultX509Source newSource() throws SocketEndpointAddressException, X509SourceException { val x509SourceOptions = X509SourceOptions.builder().initTimeout(DEFAULT_TIMEOUT).build(); return newSource(x509SourceOptions); } }
DefaultX509Source implements X509Source { public static DefaultX509Source newSource() throws SocketEndpointAddressException, X509SourceException { val x509SourceOptions = X509SourceOptions.builder().initTimeout(DEFAULT_TIMEOUT).build(); return newSource(x509SourceOptions); } private  DefaultX509Source(final Function<List<X509Svid>, X509Svid> svidPicker, final WorkloadApiClient workloadApiClient); }
DefaultX509Source implements X509Source { public static DefaultX509Source newSource() throws SocketEndpointAddressException, X509SourceException { val x509SourceOptions = X509SourceOptions.builder().initTimeout(DEFAULT_TIMEOUT).build(); return newSource(x509SourceOptions); } private  DefaultX509Source(final Function<List<X509Svid>, X509Svid> svidPicker, final WorkloadApiClient workloadApiClient); static DefaultX509Source newSource(); static DefaultX509Source newSource(@NonNull final X509SourceOptions options); @Override X509Svid getX509Svid(); @Override X509Bundle getBundleForTrustDomain(@NonNull final TrustDomain trustDomain); @SneakyThrows @Override void close(); }
DefaultX509Source implements X509Source { public static DefaultX509Source newSource() throws SocketEndpointAddressException, X509SourceException { val x509SourceOptions = X509SourceOptions.builder().initTimeout(DEFAULT_TIMEOUT).build(); return newSource(x509SourceOptions); } private  DefaultX509Source(final Function<List<X509Svid>, X509Svid> svidPicker, final WorkloadApiClient workloadApiClient); static DefaultX509Source newSource(); static DefaultX509Source newSource(@NonNull final X509SourceOptions options); @Override X509Svid getX509Svid(); @Override X509Bundle getBundleForTrustDomain(@NonNull final TrustDomain trustDomain); @SneakyThrows @Override void close();  }