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

public Class JcaPKIXIdentity

extends PKIXIdentity
Class Inheritance
Imports
java.security.PrivateKey, java.security.cert.CertificateEncodingException, .X509Certificate, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.cert.X509CertificateHolder, org.bouncycastle.cert.jcajce.JcaX509CertificateHolder, org.bouncycastle.pkix.PKIXIdentity

Holder class for public/private key based identity information.

Field Summary

Modifier and TypeField and Description
private final X509Certificate[]
private final PrivateKey

Constructor Summary

AccessConstructor and Description
public
JcaPKIXIdentity(PrivateKey
the private key.
privKey
,
X509Certificate[]
the public key certificates identifying it.
certs
)

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

public
JcaPKIXIdentity(PrivateKey
the private key.
privKey
,
X509Certificate
privKey's matching public key certificate.
cert
)

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

Method Summary

Modifier and TypeMethod and Description
private static X509CertificateHolder[]
public PrivateKey

Returns:

the identity's private key.
getPrivateKey
()

Return the private key for this identity.

private static PrivateKeyInfo
public X509Certificate

Returns:

the primary certificate.
getX509Certificate
()

Return the certificate associated with the private key.

public X509Certificate[]

Returns:

the certificate chain.
getX509CertificateChain
()

Return the certificate chain associated with the private key.

Inherited from org.bouncycastle.pkix.PKIXIdentity:
getCertificategetCertificateChaingetPrivateKeyInfogetRecipientId

Field Detail

certsback to summary
private final X509Certificate[] certs
privKeyback to summary
private final PrivateKey privKey

Constructor Detail

JcaPKIXIdentityback to summary
public JcaPKIXIdentity(PrivateKey privKey, X509Certificate[] certs)

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

Parameters
privKey:PrivateKey

the private key.

certs:X509Certificate[]

the public key certificates identifying it.

JcaPKIXIdentityback to summary
public JcaPKIXIdentity(PrivateKey privKey, X509Certificate cert)

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

Parameters
privKey:PrivateKey

the private key.

cert:X509Certificate

privKey's matching public key certificate.

Method Detail

getCertificatesback to summary
private static X509CertificateHolder[] getCertificates(X509Certificate[] certs)
getPrivateKeyback to summary
public PrivateKey getPrivateKey()

Return the private key for this identity.

Returns:PrivateKey

the identity's private key.

getPrivateKeyInfoback to summary
private static PrivateKeyInfo getPrivateKeyInfo(PrivateKey privateKey)
getX509Certificateback to summary
public X509Certificate getX509Certificate()

Return the certificate associated with the private key.

Returns:X509Certificate

the primary certificate.

getX509CertificateChainback to summary
public X509Certificate[] getX509CertificateChain()

Return the certificate chain associated with the private key.

Returns:X509Certificate[]

the certificate chain.