class HttpCrlFetcher implements CrlFetcher {

  protected X509CRL httpDownload(String url) throws CertificateValidationException
  {
    try
    {
      CertificateFactory cf = CertificateFactory.getInstance("x509", BouncyCastleProvider.PROVIDER_NAME);
      return (X509CRL)cf.generateCRL(URI.create(url).toURL().openStream());
    }
    catch (IOException | CRLException | CertificateException | NoSuchProviderException e)
    {
      throw new CertificateValidationException(String.format("Failed to download CRL '%s' (%s)",
                                                             url,
                                                             e.getMessage()),
                                               e);
    }
  }

  public  HttpCrlFetcher(Set<X509Certificate> trustAnchors);

}