Package org.bouncycastle.cert.jcajce
Class JcaX509CertificateConverter
- java.lang.Object
-
- org.bouncycastle.cert.jcajce.JcaX509CertificateConverter
-
public class JcaX509CertificateConverter extends java.lang.Object
Converter for producing X509Certificate objects tied to a specific provider from X509CertificateHolder objects.
-
-
Constructor Summary
Constructors Constructor Description JcaX509CertificateConverter()
Base constructor, configure with the default provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.cert.X509Certificate
getCertificate(X509CertificateHolder certHolder)
Use the configured converter to produce a X509Certificate object from a X509CertificateHolder object.JcaX509CertificateConverter
setProvider(java.lang.String providerName)
Set the provider to use by name.JcaX509CertificateConverter
setProvider(java.security.Provider provider)
Set the provider to use from a Provider object.
-
-
-
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.
-
-