org.mozilla.jss.pkcs11

Class PK11Store

public final class PK11Store extends Object implements CryptoStore

Field Summary
protected TokenProxystoreProxy
protected booleanupdated
Constructor Summary
PK11Store(TokenProxy proxy)
protected PK11Store()
Method Summary
voiddeleteCert(X509Certificate cert)
Deletes the specified certificate and its associated private key from the store.
voiddeleteCertOnly(X509Certificate cert)
Deletes the specified certificate from the store.
voiddeletePrivateKey(PrivateKey key)
X509Certificate[]getCertificates()
byte[]getEncryptedPrivateKeyInfo(X509Certificate cert, PBEAlgorithm pbeAlg, Password pw, int iteration)
PrivateKey[]getPrivateKeys()
voidimportPrivateKey(byte[] key, PrivateKey.Type type)
Imports a raw private key into this token.
protected voidputCertsInVector(Vector certs)
protected voidputKeysInVector(Vector keys)

Field Detail

storeProxy

protected TokenProxy storeProxy

updated

protected boolean updated

Constructor Detail

PK11Store

public PK11Store(TokenProxy proxy)

PK11Store

protected PK11Store()

Method Detail

deleteCert

public void deleteCert(X509Certificate cert)
Deletes the specified certificate and its associated private key from the store.

Parameters: cert certificate to be deleted

Throws: NoSuchItemOnTokenException If the certificate not found TokenException General token error

deleteCertOnly

public void deleteCertOnly(X509Certificate cert)
Deletes the specified certificate from the store.

Parameters: cert certificate to be deleted

Throws: NoSuchItemOnTokenException If the certificate not found TokenException General token error

deletePrivateKey

public void deletePrivateKey(PrivateKey key)

getCertificates

public X509Certificate[] getCertificates()

getEncryptedPrivateKeyInfo

public byte[] getEncryptedPrivateKeyInfo(X509Certificate cert, PBEAlgorithm pbeAlg, Password pw, int iteration)

getPrivateKeys

public PrivateKey[] getPrivateKeys()

importPrivateKey

public void importPrivateKey(byte[] key, PrivateKey.Type type)
Imports a raw private key into this token.

Parameters: key The private key.

Throws: TokenException If the key cannot be imported to this token. KeyAlreadyImportedException If the key already on this token.

putCertsInVector

protected void putCertsInVector(Vector certs)

putKeysInVector

protected void putKeysInVector(Vector keys)