Top Description Inners Fields Constructors Methods
org.bouncycastle.cert.jcajce

public Class JcaX509CertificateConverter

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, java.security.NoSuchProviderException, .Provider, java.security.cert.CertificateException, .CertificateFactory, .CertificateParsingException, .X509Certificate, org.bouncycastle.cert.X509CertificateHolder

Converter for producing X509Certificate objects tied to a specific provider from X509CertificateHolder objects.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private CertHelper

Constructor Summary

AccessConstructor and Description
public
JcaX509CertificateConverter()

Base constructor, configure with the default provider.

Method Summary

Modifier and TypeMethod and Description
public X509Certificate

Returns:

a X509Certificate object
getCertificate
(X509CertificateHolder
the holder to be converted
certHolder
)

Use the configured converter to produce a X509Certificate object from a X509CertificateHolder object.

public JcaX509CertificateConverter

Returns:

the converter instance.
setProvider
(Provider
the provider to use.
provider
)

Set the provider to use from a Provider object.

public JcaX509CertificateConverter

Returns:

the converter instance.
setProvider
(String
name of the provider to use.
providerName
)

Set the provider to use by name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

helperback to summary
private CertHelper helper

Constructor Detail

JcaX509CertificateConverterback to summary
public JcaX509CertificateConverter()

Base constructor, configure with the default provider.

Method Detail

getCertificateback to summary
public X509Certificate getCertificate(X509CertificateHolder certHolder) throws CertificateException

Use the configured converter to produce a X509Certificate object from a X509CertificateHolder object.

Parameters
certHolder:X509CertificateHolder

the holder to be converted

Returns:X509Certificate

a X509Certificate object

Exceptions
CertificateException:
if the conversion is unable to be made.
setProviderback to summary
public JcaX509CertificateConverter setProvider(Provider provider)

Set the provider to use from a Provider object.

Parameters
provider:Provider

the provider to use.

Returns:JcaX509CertificateConverter

the converter instance.

setProviderback to summary
public JcaX509CertificateConverter setProvider(String providerName)

Set the provider to use by name.

Parameters
providerName:String

name of the provider to use.

Returns:JcaX509CertificateConverter

the converter instance.

org.bouncycastle.cert.jcajce back to summary

private Class JcaX509CertificateConverter.ExCertificateException

extends CertificateException
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Throwable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Throwable
getCause()

Overrides java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Field Detail

causeback to summary
private Throwable cause

Hides java.lang.Throwable.cause.

Constructor Detail

ExCertificateExceptionback to summary
public ExCertificateException(String msg, Throwable cause)

Method Detail

getCauseback to summary
public Throwable getCause()

Overrides java.lang.Throwable.getCause.

Doc from java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the initCause(Throwable) method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.

Returns:Throwable

the cause of this throwable or null if the cause is nonexistent or unknown.

org.bouncycastle.cert.jcajce back to summary

private Class JcaX509CertificateConverter.ExCertificateParsingException

extends CertificateParsingException
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Throwable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Throwable
getCause()

Overrides java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Field Detail

causeback to summary
private Throwable cause

Hides java.lang.Throwable.cause.

Constructor Detail

ExCertificateParsingExceptionback to summary
public ExCertificateParsingException(String msg, Throwable cause)

Method Detail

getCauseback to summary
public Throwable getCause()

Overrides java.lang.Throwable.getCause.

Doc from java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the initCause(Throwable) method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.

Returns:Throwable

the cause of this throwable or null if the cause is nonexistent or unknown.