SHOW Signed
 

net.rim.device.api.crypto.keystore
Class KeyStoreManager

java.lang.Object
  |
  +--net.rim.device.api.crypto.keystore.KeyStoreManager

public final class KeyStoreManager
extends Object

Coordinates all administrative tasks associated with each key store.

Ensures that any revoked certificates are propogated throughout all of the keystores and that if the passphrase is changed it will be changed for all of the keystores.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

Since:
JDE 3.6.0

Method Summary
 Category: Signed  void certificateAdded(Certificate certificate)
          This method is called by the KeyStore when a new certificate is added to the KeyStore collection.
 Category: Signed static KeyStoreManager getInstance()
          This method returns an instance of the KeyStoreManager.
 Category: Signed  KeyStore getKeyStore(KeyStoreData data)
          This method will search through all of the KeyStores currently registered with the KeyStoreManager to see if the KeyStoreData object is a member of that KeyStore.
 Category: Signed  void register(KeyStore keyStore)
          Registers a key store with the key store manager.
 Category: Signed  void register(String className, long id, CodeSigningKey key, KeyStore keyStore)
          Registers a key store.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

certificateAdded

public void certificateAdded(Certificate certificate)
This method is called by the KeyStore when a new certificate is added to the KeyStore collection.
Parameters:
certificate - The certificate that was added to the KeyStore.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

getInstance

public static KeyStoreManager getInstance()
This method returns an instance of the KeyStoreManager.

Returns:
The KeyStoreManager object.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

getKeyStore

public KeyStore getKeyStore(KeyStoreData data)
This method will search through all of the KeyStores currently registered with the KeyStoreManager to see if the KeyStoreData object is a member of that KeyStore. If so, then it will return that KeyStore. Otherwise it will return null.
Returns:
the KeyStore that contains the KeyStoreData or null if no KeyStore is found.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

register

public void register(KeyStore keyStore)
Registers a key store with the key store manager.

If you are registering a PersistableRIMKeyStore then use the other register method.

This is useful for when the KeyStore password is changed on the device. The KeyStoreManager will inform each of the registered keystores what the old password was and what the new password is. Registration is currently mandatory for all keystores. If you develop your own keystore please ensure that you register with the KeyStoreManager.

Parameters:
keyStore - The key store to be registered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

register

public void register(String className,
                     long id,
                     CodeSigningKey key,
                     KeyStore keyStore)
              throws KeyStoreRegisterException
Registers a key store.

This method is used to register key stores that need to be persistable. That is, keystores that extend or mimic the PersistableRIMKeyStore. This method will test to make sure that your KeyStore is persistable.

Parameters:
className - The class name of the PersistableRIMKeyStoreFactory.
id - A long representing which key store this is. It has to be unique.
key - a CodeSigningKey which can be used to prevent unauthorized access to your keystore.
keyStore - The key store to register.
Throws:
KeyStoreRegisterException - Thrown if the class could not be correctly instantiated.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.