|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.jss.pkcs11.PK11Store
public final class PK11Store
Field Summary | |
---|---|
protected TokenProxy |
storeProxy
|
protected boolean |
updated
|
Constructor Summary | |
---|---|
protected |
PK11Store()
|
|
PK11Store(TokenProxy proxy)
|
Method Summary | |
---|---|
void |
deleteCert(X509Certificate cert)
Deletes the specified certificate and its associated private key from the store. |
void |
deleteCertOnly(X509Certificate cert)
Deletes the specified certificate from the store. |
void |
deletePrivateKey(PrivateKey key)
Deletes the given PrivateKey from the CryptoToken. |
X509Certificate[] |
getCertificates()
Returns all user certificates stored on this token. |
byte[] |
getEncryptedPrivateKeyInfo(X509Certificate cert,
PBEAlgorithm pbeAlg,
Password pw,
int iteration)
|
PrivateKey[] |
getPrivateKeys()
Returns all private keys stored on this token. |
void |
importPrivateKey(byte[] key,
PrivateKey.Type type)
Imports a raw private key into this token. |
protected void |
putCertsInVector(java.util.Vector certs)
|
protected void |
putKeysInVector(java.util.Vector keys)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean updated
protected TokenProxy storeProxy
Constructor Detail |
---|
public PK11Store(TokenProxy proxy)
protected PK11Store()
Method Detail |
---|
public void importPrivateKey(byte[] key, PrivateKey.Type type) throws TokenException, KeyAlreadyImportedException
importPrivateKey
in interface CryptoStore
key
- The private key.
TokenException
- If the key cannot be imported to this token.
KeyAlreadyImportedException
- If the key already on this token.public PrivateKey[] getPrivateKeys() throws TokenException
CryptoStore
getPrivateKeys
in interface CryptoStore
TokenException
- If an error occurs on the token while
gathering the keys.protected void putKeysInVector(java.util.Vector keys) throws TokenException
TokenException
public void deletePrivateKey(PrivateKey key) throws NoSuchItemOnTokenException, TokenException
CryptoStore
deletePrivateKey
in interface CryptoStore
key
- A PrivateKey to be permanently deleted. It must reside
on this token.
NoSuchItemOnTokenException
- If the given privae key does
not reside on this token.
TokenException
- If an error occurs on the token while
deleting the key.public byte[] getEncryptedPrivateKeyInfo(X509Certificate cert, PBEAlgorithm pbeAlg, Password pw, int iteration)
getEncryptedPrivateKeyInfo
in interface CryptoStore
public X509Certificate[] getCertificates() throws TokenException
CryptoStore
getCertificates
in interface CryptoStore
TokenException
- If an error occurs on the token while
gathering the certificates.protected void putCertsInVector(java.util.Vector certs) throws TokenException
TokenException
public void deleteCert(X509Certificate cert) throws NoSuchItemOnTokenException, TokenException
deleteCert
in interface CryptoStore
cert
- certificate to be deleted
NoSuchItemOnTokenException
- If the certificate not found
TokenException
- General token errorpublic void deleteCertOnly(X509Certificate cert) throws NoSuchItemOnTokenException, TokenException
cert
- certificate to be deleted
NoSuchItemOnTokenException
- If the certificate not found
TokenException
- General token error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |