public class

JDKPKCS12KeyStore

extends KeyStoreSpi
implements PKCSObjectIdentifiers X509ObjectIdentifiers BCKeyStore
java.lang.Object
   ↳ java.security.KeyStoreSpi
     ↳ org.bouncycastle.jce.provider.JDKPKCS12KeyStore
Known Direct Subclasses

Summary

Nested Classes
class JDKPKCS12KeyStore.BCPKCS12KeyStore  
class JDKPKCS12KeyStore.BCPKCS12KeyStore3DES  
class JDKPKCS12KeyStore.DefPKCS12KeyStore  
class JDKPKCS12KeyStore.DefPKCS12KeyStore3DES  
[Expand]
Inherited Constants
From interface org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers
From interface org.bouncycastle.asn1.x509.X509ObjectIdentifiers
Fields
protected SecureRandom random
[Expand]
Inherited Fields
From interface org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers
From interface org.bouncycastle.asn1.x509.X509ObjectIdentifiers
Public Constructors
JDKPKCS12KeyStore(Provider provider, DERObjectIdentifier keyAlgorithm, DERObjectIdentifier certAlgorithm)
Public Methods
Enumeration engineAliases()
boolean engineContainsAlias(String alias)
void engineDeleteEntry(String alias)
this is not quite complete - we should follow up on the chain, a bit tricky if a certificate appears in more than one chain...
Certificate engineGetCertificate(String alias)
simply return the cert for the private key
String engineGetCertificateAlias(Certificate cert)
Certificate[] engineGetCertificateChain(String alias)
Date engineGetCreationDate(String alias)
Key engineGetKey(String alias, char[] password)
boolean engineIsCertificateEntry(String alias)
boolean engineIsKeyEntry(String alias)
void engineLoad(InputStream stream, char[] password)
void engineSetCertificateEntry(String alias, Certificate cert)
void engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain)
void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain)
int engineSize()
void engineStore(KeyStore.LoadStoreParameter param)
void engineStore(OutputStream stream, char[] password)
void setRandom(SecureRandom rand)
set the random source for the key store
Protected Methods
byte[] cryptData(boolean forEncryption, AlgorithmIdentifier algId, char[] password, boolean wrongPKCS12Zero, byte[] data)
PrivateKey unwrapKey(AlgorithmIdentifier algId, byte[] data, char[] password, boolean wrongPKCS12Zero)
byte[] wrapKey(String algorithm, Key key, PKCS12PBEParams pbeParams, char[] password)
[Expand]
Inherited Methods
From class java.security.KeyStoreSpi
From class java.lang.Object
From interface org.bouncycastle.jce.interfaces.BCKeyStore

Fields

protected SecureRandom random

Public Constructors

public JDKPKCS12KeyStore (Provider provider, DERObjectIdentifier keyAlgorithm, DERObjectIdentifier certAlgorithm)

Public Methods

public Enumeration engineAliases ()

public boolean engineContainsAlias (String alias)

public void engineDeleteEntry (String alias)

this is not quite complete - we should follow up on the chain, a bit tricky if a certificate appears in more than one chain...

public Certificate engineGetCertificate (String alias)

simply return the cert for the private key

public String engineGetCertificateAlias (Certificate cert)

public Certificate[] engineGetCertificateChain (String alias)

public Date engineGetCreationDate (String alias)

public Key engineGetKey (String alias, char[] password)

public boolean engineIsCertificateEntry (String alias)

public boolean engineIsKeyEntry (String alias)

public void engineLoad (InputStream stream, char[] password)

Throws
IOException

public void engineSetCertificateEntry (String alias, Certificate cert)

public void engineSetKeyEntry (String alias, Key key, char[] password, Certificate[] chain)

public void engineSetKeyEntry (String alias, byte[] key, Certificate[] chain)

public int engineSize ()

public void engineStore (OutputStream stream, char[] password)

Throws
IOException

public void setRandom (SecureRandom rand)

set the random source for the key store

Protected Methods

protected byte[] cryptData (boolean forEncryption, AlgorithmIdentifier algId, char[] password, boolean wrongPKCS12Zero, byte[] data)

Throws
IOException

protected PrivateKey unwrapKey (AlgorithmIdentifier algId, byte[] data, char[] password, boolean wrongPKCS12Zero)

Throws
IOException

protected byte[] wrapKey (String algorithm, Key key, PKCS12PBEParams pbeParams, char[] password)

Throws
IOException