Class JcaX509CertificateConverter

java.lang.Object
org.bouncycastle.cert.jcajce.JcaX509CertificateConverter

public class JcaX509CertificateConverter extends Object
Converter for producing X509Certificate objects tied to a specific provider from X509CertificateHolder objects.
  • Constructor Details

    • JcaX509CertificateConverter

      public JcaX509CertificateConverter()
      Base constructor, configure with the default provider.
  • Method Details

    • setProvider

      public JcaX509CertificateConverter setProvider(Provider provider)
      Set the provider to use from a Provider object.
      Parameters:
      provider - the provider to use.
      Returns:
      the converter instance.
    • setProvider

      public JcaX509CertificateConverter setProvider(String providerName)
      Set the provider to use by name.
      Parameters:
      providerName - name of the provider to use.
      Returns:
      the converter instance.
    • getCertificate

      public X509Certificate getCertificate(X509CertificateHolder certHolder) throws CertificateException
      Use the configured converter to produce a X509Certificate object from a X509CertificateHolder object.
      Parameters:
      certHolder - the holder to be converted
      Returns:
      a X509Certificate object
      Throws:
      CertificateException - if the conversion is unable to be made.