org.alfresco.encryption
Interface AlfrescoKeyStore

All Known Implementing Classes:
AlfrescoKeyStoreImpl

public interface AlfrescoKeyStore

Manages a Java Keystore for Alfresco, including caching keys where appropriate.

Since:
4.0

Field Summary
static java.lang.String KEY_KEYSTORE_PASSWORD
           
 
Method Summary
 void backup()
          Backup the keystore to the backup location.
 void create()
          Create the key store if it doesn't exist.
 javax.net.ssl.KeyManager[] createKeyManagers()
          Create an array of key managers from keys in the key store.
 javax.net.ssl.TrustManager[] createTrustManagers()
          Create an array of trust managers from certificates in the key store.
 boolean exists()
          Does the underlying key store exist?
 java.security.Key getBackupKey(java.lang.String keyAlias)
          Return the backup key with the given key alias.
 KeyStoreParameters getBackupKeyStoreParameters()
          The backup key store parameters.
 java.security.Key getKey(java.lang.String keyAlias)
          Return the key with the given key alias.
 java.util.Set getKeyAliases()
          Return all key aliases in the key store.
 KeyStoreParameters getKeyStoreParameters()
          The key store parameters.
 long getKeyTimestamp(java.lang.String keyAlias)
          Return the timestamp (in ms) of when the key was last loaded from the keystore on disk.
 java.lang.String getName()
          The name of the keystore.
 void reload()
          Reload the keys from the key store.
 void validateKeys()
          Check that the keys in the key store are valid i.e.
 

Field Detail

KEY_KEYSTORE_PASSWORD

static final java.lang.String KEY_KEYSTORE_PASSWORD
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
The name of the keystore.

Returns:
the name of the keystore.

backup

void backup()
Backup the keystore to the backup location. Write the keys to the backup keystore.


getKeyStoreParameters

KeyStoreParameters getKeyStoreParameters()
The key store parameters.

Returns:

getBackupKeyStoreParameters

KeyStoreParameters getBackupKeyStoreParameters()
The backup key store parameters.

Returns:

exists

boolean exists()
Does the underlying key store exist?

Returns:
true if it exists, false otherwise

getKey

java.security.Key getKey(java.lang.String keyAlias)
Return the key with the given key alias.

Parameters:
keyAlias -
Returns:

getKeyTimestamp

long getKeyTimestamp(java.lang.String keyAlias)
Return the timestamp (in ms) of when the key was last loaded from the keystore on disk.

Parameters:
keyAlias -
Returns:

getBackupKey

java.security.Key getBackupKey(java.lang.String keyAlias)
Return the backup key with the given key alias.

Parameters:
keyAlias -
Returns:

getKeyAliases

java.util.Set getKeyAliases()
Return all key aliases in the key store.

Returns:

createKeyManagers

javax.net.ssl.KeyManager[] createKeyManagers()
Create an array of key managers from keys in the key store.

Returns:

createTrustManagers

javax.net.ssl.TrustManager[] createTrustManagers()
Create an array of trust managers from certificates in the key store.

Returns:

create

void create()
Create the key store if it doesn't exist. A key for each key alias will be written to the keystore on disk, either from the cached keys or, if not present, a key will be generated.


reload

void reload()
            throws InvalidKeystoreException,
                   MissingKeyException
Reload the keys from the key store.

Throws:
InvalidKeystoreException
MissingKeyException

validateKeys

void validateKeys()
                  throws InvalidKeystoreException,
                         MissingKeyException
Check that the keys in the key store are valid i.e. that they match those registered.

Throws:
InvalidKeystoreException
MissingKeyException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.