public class KeyPairPKCS12 extends PKCS12
Constructor and Description |
---|
KeyPairPKCS12()
Creates a new empty instance.
|
KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.List<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID, java.lang.String friendlyName)
Make a PKCS12 object containing the given certificate chain and private key.
|
KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID)
Deprecated.
|
KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID, java.lang.String friendlyName)
Deprecated.
|
KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, int mode)
Deprecated.
use KeyPairPKCS12(PrivateKeyPKCS8, List, ASN1ObjectID) instead
|
KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, int mode, java.lang.String friendlyName)
Deprecated.
use KeyPairPKCS12(PrivateKeyPKCS8, List, ASN1ObjectID, String) instead
|
KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.asn1.ASN1Sequence s) |
KeyPairPKCS12(java.lang.String passwd, java.io.InputStream is) |
KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.List<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID, java.lang.String friendlyName)
Make a PKCS12 object encrypted with the specified password, and containing the given certificate chain and private key.
|
KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID)
Deprecated.
use KeyPairPKCS12(String, PrivateKeyPKCS8, List, ASN1ObjectID, String) instead
|
KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID, java.lang.String friendlyName)
|
KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, int mode)
Deprecated.
use KeyPairPKCS12(String, PrivateKeyPKCS8, List, ASN1ObjectID) instead
|
KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, int mode, java.lang.String friendlyName)
Deprecated.
use KeyPairPKCS12(String, PrivateKeyPKCS8, List, ASN1ObjectID, String) instead
|
Modifier and Type | Method and Description |
---|---|
X509 |
getBottomCert() |
java.util.Vector<X509> |
getCertificateChain()
Deprecated.
|
java.util.ArrayList<X509> |
getCertificateChainAsList()
Gets the certificate chain from this
KeyPairPKCS12 in order from bottom to top. |
oracle.security.crypto.core.PrivateKey |
getPrivateKey()
Decrypts the
PrivateKeyPKCS8 enclosed in this KeyPairPKCS12 's PKCS12ShroudedKeyBag , using the password set for it (default is the parent PKCS12 's password). |
oracle.security.crypto.core.PrivateKey |
getPrivateKey(java.lang.String passwd)
Decrypts the
PrivateKeyPKCS8 enclosed in this KeyPairPKCS12 's PKCS12ShroudedKeyBag , using the given password. |
oracle.security.crypto.core.PrivateKeyPKCS8 |
getPrivateKeyPKCS8() |
void |
input(oracle.security.crypto.asn1.ASN1Sequence s)
Reconstructs this object from its representation as an ASN.1 sequence.
|
void |
input(java.io.InputStream is)
Reconstructs this object by reading its DER encoding from the specified input stream.
|
addAuthSafe, getAuthSafes, getAuthSafesAsList, getPasswd, getPassword, length, output, readExternal, setAuthSafes, setAuthSafes, setPasswd, setPassword, toString, verify, writeExternal
public KeyPairPKCS12()
public KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, int mode)
pkcs8
- a PKCS8 private keycertChain
- a vector of X509
certificatesmode
- the encryption mode for the certificate chain (use constants from PKCS5
)public KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID)
KeyPairPKCS12(PrivateKeyPKCS8, List, ASN1ObjectID, String)
pkcs8
- a PKCS8 private keycertChain
- a List of X509
certificatespbeOID
- the encryption mode for the certificate chain (use constants from oracle.security.crypto.core.PBEAlgorithmIdentifier
)public KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, int mode, java.lang.String friendlyName)
pkcs8
- A PKCS8 private key.certChain
- A List of X509
certificates.mode
- The encryption mode for the certificate chain (use constants from PKCS5
).friendlyName
- Friendly name for the key and bottom certificate.public KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID, java.lang.String friendlyName)
KeyPairPKCS12(PrivateKeyPKCS8, List, ASN1ObjectID, String)
pkcs8
- A PKCS8 private key.certChain
- A List of X509
certificates.pbeOID
- The encryption mode for the certificate chain (use constants from oracle.security.crypto.core.PBEAlgorithmIdentifier
).friendlyName
- Friendly name for the key and bottom certificate.public KeyPairPKCS12(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.List<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID, java.lang.String friendlyName)
pkcs8
- A PKCS8 private key.certChain
- A List of X509
certificates.pbeOID
- The encryption mode for the certificate chain (use constants from oracle.security.crypto.core.PBEAlgorithmIdentifier
).friendlyName
- Friendly name for the key and bottom certificate.public KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, int mode)
passwd
- the encryption passwordpkcs8
- a PKCS8 private keycertChain
- a List of X509
certificatesmode
- the encryption mode for the certificate chain (use constants from PKCS5
)public KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID)
passwd
- the encryption passwordpkcs8
- a PKCS8 private keycertChain
- a List of X509
certificatesmode
- the encryption mode for the certificate chain (use constants from oracle.security.crypto.core.PBEAlgorithmIdentifier
)public KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, int mode, java.lang.String friendlyName)
passwd
- the encryption passwordpkcs8
- a PKCS8 private keycertChain
- a vector of X509
certificatesmode
- the encryption mode for the certificate chain (use constants from PKCS5
)friendlyName
- friendly name for the key and bottom certificatepublic KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.Vector<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID, java.lang.String friendlyName)
passwd
- the encryption passwordpkcs8
- a PKCS8 private keycertChain
- a vector of X509
certificatesmode
- the encryption mode for the certificate chain (use constants from oracle.security.crypto.core.PBEAlgorithmIdentifier
)friendlyName
- friendly name for the key and bottom certificatepublic KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8, java.util.List<X509> certChain, oracle.security.crypto.asn1.ASN1ObjectID pbeOID, java.lang.String friendlyName)
passwd
- the encryption passwordpkcs8
- a PKCS8 private keycertChain
- a List of X509
certificatesmode
- the encryption mode for the certificate chain (use constants from oracle.security.crypto.core.PBEAlgorithmIdentifier
)friendlyName
- friendly name for the key and bottom certificatepublic KeyPairPKCS12(java.lang.String passwd, java.io.InputStream is) throws java.io.IOException
java.io.IOException
public KeyPairPKCS12(java.lang.String passwd, oracle.security.crypto.asn1.ASN1Sequence s) throws java.io.IOException
java.io.IOException
public void input(oracle.security.crypto.asn1.ASN1Sequence s) throws java.io.IOException
PKCS12
public void input(java.io.InputStream is) throws java.io.IOException
PKCS12
public oracle.security.crypto.core.PrivateKeyPKCS8 getPrivateKeyPKCS8()
public oracle.security.crypto.core.PrivateKey getPrivateKey()
PrivateKeyPKCS8
enclosed in this KeyPairPKCS12
's PKCS12ShroudedKeyBag
, using the password set for it (default is the parent PKCS12
's password).getPrivateKey(String passwd)
public oracle.security.crypto.core.PrivateKey getPrivateKey(java.lang.String passwd)
PrivateKeyPKCS8
enclosed in this KeyPairPKCS12
's PKCS12ShroudedKeyBag
, using the given password.getPrivateKey()
@Deprecated public java.util.Vector<X509> getCertificateChain()
KeyPairPKCS12
in order from bottom to top.Vector
of X509
certificates (possibly empty), or null
if this KeyPairPKCS12
was not constructed from an input stream.public java.util.ArrayList<X509> getCertificateChainAsList()
KeyPairPKCS12
in order from bottom to top.ArrayList
of X509
certificates (possibly empty), or null
if this KeyPairPKCS12
was not constructed from an input stream.public X509 getBottomCert()