iaik.tc.tss.impl.ps
Class TcTssPersistentStorage

java.lang.Object
  extended by iaik.tc.tss.impl.ps.TcTssPersistentStorage
All Implemented Interfaces:
TcITssPersistentStorage
Direct Known Subclasses:
TcTssPsDatabase, TcTssPsFileSystem, TcTssPsTrousers

public abstract class TcTssPersistentStorage
extends java.lang.Object
implements TcITssPersistentStorage


Constructor Summary
TcTssPersistentStorage(Properties properties)
           
 
Method Summary
 TcTssKmKeyinfo[] enumRegisteredKeys(TcTssUuid keyUuid)
          Returns the whole key hierarchy of the given key i.e.
 TcTssKmKeyinfo getRegisteredKey(TcTssUuid keyUuid)
          Returns information on a registered key.
 TcBlobData getRegisteredKeyBlob(TcTssUuid keyUuid)
          Gets the key blob from the key described by this UUID
 TcBlobData getRegisteredKeyByPublicInfo(long algId, TcBlobData pubKey)
          TODO complete documentation Returns a key blob described by the given public key and its algorithm
 void registerKey(TcTssUuid parentUuid, TcTssUuid keyUuid, TcBlobData key)
          Registers the key in persistent storage.
 void unregisterKey(TcTssUuid keyUuid)
          Unregisters the key in persistent storage.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcTssPersistentStorage

public TcTssPersistentStorage(Properties properties)
Method Detail

registerKey

public void registerKey(TcTssUuid parentUuid,
                        TcTssUuid keyUuid,
                        TcBlobData key)
                 throws TcTssException
Description copied from interface: TcITssPersistentStorage
Registers the key in persistent storage.

Specified by:
registerKey in interface TcITssPersistentStorage
Parameters:
parentUuid - the parent from the actual key
keyUuid - the UUID assigned to the key (has to be unique!)
key - the key value
Throws:
TcTssException - if registration failed

unregisterKey

public void unregisterKey(TcTssUuid keyUuid)
                   throws TcTssException
Description copied from interface: TcITssPersistentStorage
Unregisters the key in persistent storage.

Specified by:
unregisterKey in interface TcITssPersistentStorage
Parameters:
keyUuid - the UUID assigned to this key
Throws:
TcTssException - if unregister key failed

getRegisteredKeyBlob

public TcBlobData getRegisteredKeyBlob(TcTssUuid keyUuid)
                                throws TcTssException
Description copied from interface: TcITssPersistentStorage
Gets the key blob from the key described by this UUID

Specified by:
getRegisteredKeyBlob in interface TcITssPersistentStorage
Parameters:
keyUuid - the UUID assigned to the desired key
Returns:
a key blob containing the key with the given UUID
Throws:
TcTssException - if getting key blob failed

getRegisteredKeyByPublicInfo

public TcBlobData getRegisteredKeyByPublicInfo(long algId,
                                               TcBlobData pubKey)
                                        throws TcTssException
Description copied from interface: TcITssPersistentStorage
TODO complete documentation Returns a key blob described by the given public key and its algorithm

Specified by:
getRegisteredKeyByPublicInfo in interface TcITssPersistentStorage
Parameters:
algId - the id describing the algorithm which belongs to the given key
pubKey - the given public key
Returns:
a blob containing the public info for the key
Throws:
TcTssException

enumRegisteredKeys

public TcTssKmKeyinfo[] enumRegisteredKeys(TcTssUuid keyUuid)
                                    throws TcTssException
Description copied from interface: TcITssPersistentStorage
Returns the whole key hierarchy of the given key i.e. all its parents as TcTssKmKeyinfo[].

Specified by:
enumRegisteredKeys in interface TcITssPersistentStorage
Parameters:
keyUuid - the UUID of the desired key
Returns:
the whole key hierarchy of the key. If the committed key value is null, all registered keys are returned.
Throws:
TcTssException - if the keys cannot be read out correctly

getRegisteredKey

public TcTssKmKeyinfo getRegisteredKey(TcTssUuid keyUuid)
                                throws TcTssException
Description copied from interface: TcITssPersistentStorage
Returns information on a registered key.

Specified by:
getRegisteredKey in interface TcITssPersistentStorage
Parameters:
keyUuid - is the key to get information on
Returns:
ATTENTION: The isLoaded field of TcTssKmKeyinfo is always false upon return, because the persistent storage has no way of knowing what the key manager is actually doing. No vendor specific data is given.
Throws:
TcTssException