Class JcaX509CertificateConverter


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

      • JcaX509CertificateConverter

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

      • setProvider

        public JcaX509CertificateConverter setProvider​(java.security.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​(java.lang.String providerName)
        Set the provider to use by name.
        Parameters:
        providerName - name of the provider to use.
        Returns:
        the converter instance.
      • getCertificate

        public java.security.cert.X509Certificate getCertificate​(X509CertificateHolder certHolder)
                                                          throws java.security.cert.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:
        java.security.cert.CertificateException - if the conversion is unable to be made.