Top Description Fields Constructors Methods
org.bouncycastle.openssl.jcajce

public Class JcaPKIXIdentityBuilder

extends Object
Class Inheritance
Imports
java.io.File, .FileInputStream, .FileNotFoundException, .IOException, .InputStream, .InputStreamReader, java.security.PrivateKey, .Provider, java.security.cert.CertificateException, .X509Certificate, java.util.ArrayList, .List, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.cert.X509CertificateHolder, org.bouncycastle.cert.jcajce.JcaX509CertificateConverter, org.bouncycastle.openssl.PEMKeyPair, .PEMParser, org.bouncycastle.pkix.jcajce.JcaPKIXIdentity

Builder for a private/public identity object representing a "user"

Field Summary

Modifier and TypeField and Description
private JcaX509CertificateConverter
private JcaPEMKeyConverter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JcaPKIXIdentity

Returns:

an identity object.
build
(File
the PEM file containing the key
keyFile
,
File
the PEM file containing the certificate
certificateFile
)

Build an identity from the passed in key and certificate file in PEM format.

public JcaPKIXIdentity

Returns:

an identity object.
build
(InputStream
the PEM stream containing the key
keyStream
,
InputStream
the PEM stream containing the certificate
certificateStream
)

Build an identity from the passed in key and certificate stream in PEM format.

private void
public JcaPKIXIdentityBuilder
public JcaPKIXIdentityBuilder
setProvider(String providerName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certConverterback to summary
private JcaX509CertificateConverter certConverter
keyConverterback to summary
private JcaPEMKeyConverter keyConverter

Constructor Detail

JcaPKIXIdentityBuilderback to summary
public JcaPKIXIdentityBuilder()

Method Detail

buildback to summary
public JcaPKIXIdentity build(File keyFile, File certificateFile) throws IOException, CertificateException

Build an identity from the passed in key and certificate file in PEM format.

Parameters
keyFile:File

the PEM file containing the key

certificateFile:File

the PEM file containing the certificate

Returns:JcaPKIXIdentity

an identity object.

Exceptions
IOException:
on a general parsing error.
CertificateException:
on a certificate parsing error.
buildback to summary
public JcaPKIXIdentity build(InputStream keyStream, InputStream certificateStream) throws IOException, CertificateException

Build an identity from the passed in key and certificate stream in PEM format.

Parameters
keyStream:InputStream

the PEM stream containing the key

certificateStream:InputStream

the PEM stream containing the certificate

Returns:JcaPKIXIdentity

an identity object.

Exceptions
IOException:
on a general parsing error.
CertificateException:
on a certificate parsing error.
checkFileback to summary
private void checkFile(File file) throws IOException
setProviderback to summary
public JcaPKIXIdentityBuilder setProvider(Provider provider)
setProviderback to summary
public JcaPKIXIdentityBuilder setProvider(String providerName)