Package org.bouncycastle.pkix
Class PKIXIdentity
java.lang.Object
org.bouncycastle.pkix.PKIXIdentity
- Direct Known Subclasses:
JcaPKIXIdentity
Holder class for public/private key based identity information.
-
Constructor Summary
ConstructorDescriptionPKIXIdentity
(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo, X509CertificateHolder certHolder) Base constructor - a private key and its associated public key certificate.PKIXIdentity
(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo, X509CertificateHolder[] certificateHolders) Base constructor - a private key and its associated certificate chain. -
Method Summary
Modifier and TypeMethodDescriptionReturn the certificate associated with the private key info.Return the certificate chain associated with the private key info.org.bouncycastle.asn1.pkcs.PrivateKeyInfo
Return the private key info for this identity.Return a RecipientId for the identity's (private key, certificate) pair.
-
Constructor Details
-
PKIXIdentity
public PKIXIdentity(org.bouncycastle.asn1.pkcs.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
- the private key.certificateHolders
- the public key certificates identifying it.
-
PKIXIdentity
public PKIXIdentity(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo, X509CertificateHolder certHolder) Base constructor - a private key and its associated public key certificate.- Parameters:
privateKeyInfo
- the private key.certHolder
- privKey's matching public key certificate.
-
-
Method Details
-
getPrivateKeyInfo
public org.bouncycastle.asn1.pkcs.PrivateKeyInfo getPrivateKeyInfo()Return the private key info for this identity.- Returns:
- the identity's private key (if available, null otherwise).
-
getCertificate
Return the certificate associated with the private key info.- Returns:
- a X509CertificateHolder
-
getCertificateChain
Return the certificate chain associated with the private key info.- Returns:
- the certificate chain.
-
getRecipientId
Return a RecipientId for the identity's (private key, certificate) pair.
-