Package org.bouncycastle.pkix.jcajce
Class JcaPKIXIdentity
- java.lang.Object
-
- org.bouncycastle.pkix.PKIXIdentity
-
- org.bouncycastle.pkix.jcajce.JcaPKIXIdentity
-
public class JcaPKIXIdentity extends PKIXIdentity
Holder class for public/private key based identity information.
-
-
Constructor Summary
Constructors Constructor Description JcaPKIXIdentity(java.security.PrivateKey privKey, java.security.cert.X509Certificate cert)Base constructor - a private key and its associated public key certificate.JcaPKIXIdentity(java.security.PrivateKey privKey, java.security.cert.X509Certificate[] certs)Base constructor - a private key and its associated certificate chain.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.PrivateKeygetPrivateKey()Return the private key for this identity.java.security.cert.X509CertificategetX509Certificate()Return the certificate associated with the private key.java.security.cert.X509Certificate[]getX509CertificateChain()Return the certificate chain associated with the private key.-
Methods inherited from class org.bouncycastle.pkix.PKIXIdentity
getCertificate, getCertificateChain, getPrivateKeyInfo, getRecipientId
-
-
-
-
Constructor Detail
-
JcaPKIXIdentity
public JcaPKIXIdentity(java.security.PrivateKey privKey, java.security.cert.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- the private key.certs- the public key certificates identifying it.
-
JcaPKIXIdentity
public JcaPKIXIdentity(java.security.PrivateKey privKey, java.security.cert.X509Certificate cert)Base constructor - a private key and its associated public key certificate.- Parameters:
privKey- the private key.cert- privKey's matching public key certificate.
-
-
Method Detail
-
getPrivateKey
public java.security.PrivateKey getPrivateKey()
Return the private key for this identity.- Returns:
- the identity's private key.
-
getX509Certificate
public java.security.cert.X509Certificate getX509Certificate()
Return the certificate associated with the private key.- Returns:
- the primary certificate.
-
getX509CertificateChain
public java.security.cert.X509Certificate[] getX509CertificateChain()
Return the certificate chain associated with the private key.- Returns:
- the certificate chain.
-
-