Top Description Fields Constructors Methods
org.bouncycastle.pkix

public Class PKIXIdentity

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.pkix.jcajce.JcaPKIXIdentity
Imports
org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.asn1.x509.SubjectKeyIdentifier, org.bouncycastle.cert.X509CertificateHolder, org.bouncycastle.cms.KeyTransRecipientId, .RecipientId

Holder class for public/private key based identity information.

Field Summary

Modifier and TypeField and Description
private final X509CertificateHolder[]
private final PrivateKeyInfo

Constructor Summary

AccessConstructor and Description
public
PKIXIdentity(PrivateKeyInfo
the private key.
privateKeyInfo
,
X509CertificateHolder[]
the public key certificates identifying it.
certificateHolders
)

Base constructor - a private key and its associated certificate chain.

public
PKIXIdentity(PrivateKeyInfo
the private key.
privateKeyInfo
,
X509CertificateHolder
privKey's matching public key certificate.
certHolder
)

Base constructor - a private key and its associated public key certificate.

Method Summary

Modifier and TypeMethod and Description
public X509CertificateHolder

Returns:

a X509CertificateHolder
getCertificate
()

Return the certificate associated with the private key info.

public X509CertificateHolder[]

Returns:

the certificate chain.
getCertificateChain
()

Return the certificate chain associated with the private key info.

public PrivateKeyInfo

Returns:

the identity's private key (if available, null otherwise).
getPrivateKeyInfo
()

Return the private key info for this identity.

public RecipientId
getRecipientId()

Return a RecipientId for the identity's (private key, certificate) pair.

private byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certificateHoldersback to summary
private final X509CertificateHolder[] certificateHolders
privateKeyInfoback to summary
private final PrivateKeyInfo privateKeyInfo

Constructor Detail

PKIXIdentityback to summary
public PKIXIdentity(PrivateKeyInfo privateKeyInfo, X509CertificateHolder[] certificateHolders)

Base constructor - a private key and its associated certificate chain. The chain should be ordered so that certificateHolders[0] is the matching public key for privKey.

Parameters
privateKeyInfo:PrivateKeyInfo

the private key.

certificateHolders:X509CertificateHolder[]

the public key certificates identifying it.

PKIXIdentityback to summary
public PKIXIdentity(PrivateKeyInfo privateKeyInfo, X509CertificateHolder certHolder)

Base constructor - a private key and its associated public key certificate.

Parameters
privateKeyInfo:PrivateKeyInfo

the private key.

certHolder:X509CertificateHolder

privKey's matching public key certificate.

Method Detail

getCertificateback to summary
public X509CertificateHolder getCertificate()

Return the certificate associated with the private key info.

Returns:X509CertificateHolder

a X509CertificateHolder

getCertificateChainback to summary
public X509CertificateHolder[] getCertificateChain()

Return the certificate chain associated with the private key info.

Returns:X509CertificateHolder[]

the certificate chain.

getPrivateKeyInfoback to summary
public PrivateKeyInfo getPrivateKeyInfo()

Return the private key info for this identity.

Returns:PrivateKeyInfo

the identity's private key (if available, null otherwise).

getRecipientIdback to summary
public RecipientId getRecipientId()

Return a RecipientId for the identity's (private key, certificate) pair.

getSubjectKeyIdentifierback to summary
private byte[] getSubjectKeyIdentifier()