iaik.tc.tss.impl.java.tsp
Class TcNvRam

java.lang.Object
  extended by iaik.tc.tss.impl.java.tsp.TcAttributes
      extended by iaik.tc.tss.impl.java.tsp.TcWorkingObject
          extended by iaik.tc.tss.impl.java.tsp.TcAuthObject
              extended by iaik.tc.tss.impl.java.tsp.TcNvRam
All Implemented Interfaces:
TcIAttributes, TcIAuthObject, TcINvRam, TcIWorkingObject

public class TcNvRam
extends TcAuthObject
implements TcINvRam


Method Summary
 void changeAuth(TcIAuthObject parentObject, TcIPolicy newPolicy)
          This method changes the authorization data (secret) of an entity (object) and assigns the object to the newPolicy object.
 void defineSpace(TcIPcrComposite readPcrComposite, TcIPcrComposite writePcrComposite)
          This method establishes the space necessary for the NV store.
 long getAttribNvDataSize(long subFlag)
          This method returns the NV data size currently set for this object.
 long getAttribNvIndex(long subFlag)
          This method returns the nvIndex currently set for this object.
 TcBlobData getAttribNvPcrData(long subFlag)
          This method returns PCR information as specified by subFlag.
 long getAttribNvPcrUint32(long subFlag)
          This method returns PCR information as specified by subFlag.
 long getAttribNvPermissions(long subFlag)
          This method returns the nvPermissions currently set for this object.
 long getAttribNvState(long subFlag)
          This method returns NV state information as specified by subFlag.
 TcBlobData readValue(long offset, long dataLength)
          This method reads the data from the defined area.
 void releaseSpace()
          This method releases the space associated with the NV store instance.
 void setAttribNvIndex(long subFlag, long attrib)
          This method sets the TcTssConstants.TSS_TSPATTRIB_NV_INDEX attribute.
 void setAttribNvPermissions(long subFlag, long attrib)
          This method sets the value of the permissions.
 void setAttrivNvDatasize(long subFlag, long attrib)
          This method sets the size of the defined NV storage area.
 void writeValue(long offset, TcBlobData dataToWrite)
          This method writes a given value to a previously defined area.
 
Methods inherited from class iaik.tc.tss.impl.java.tsp.TcAuthObject
changeAuthAsym, getPolicyObject, getUsagePolicyObject
 
Methods inherited from class iaik.tc.tss.impl.java.tsp.TcAttributes
getAttribData, getAttribUint32, setAttribData, setAttribUint32
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface iaik.tc.tss.api.tspi.TcIAttributes
getAttribData, getAttribUint32, setAttribData, setAttribUint32
 
Methods inherited from interface iaik.tc.tss.api.tspi.TcIAuthObject
changeAuthAsym, getPolicyObject, getUsagePolicyObject
 

Method Detail

defineSpace

public void defineSpace(TcIPcrComposite readPcrComposite,
                        TcIPcrComposite writePcrComposite)
                 throws TcTssException
Description copied from interface: TcINvRam
This method establishes the space necessary for the NV store. Note that this command requires owner authorization which can be set via the usage policy of the TPM object.

Specified by:
defineSpace in interface TcINvRam
Parameters:
readPcrComposite - If this value is null, no PCR values are associated with reading from the NV space. If not null, the newly created NV storage area will require the PCR values described in this parameter for successfully reading this storage area.
writePcrComposite - If this value is null, no PCR values are associated with writing to the NV space. If not null, the newly created NV storage area will require the PCR values describe in this parameter for successfully writing to this storage area.
Throws:
TcTssException

readValue

public TcBlobData readValue(long offset,
                            long dataLength)
                     throws TcTssException
Description copied from interface: TcINvRam
This method reads the data from the defined area. If a policy object is assigned to this object, the authData within the policy object will be used to authorize this operation. If there is no policy object associated with this object, an unauthenticated write will be performed.

Specified by:
readValue in interface TcINvRam
Parameters:
offset - The offset within the NV area to begin reading.
dataLength - The number of bytes to be read.
Returns:
The data read from the NV area.
Throws:
TcTssException

releaseSpace

public void releaseSpace()
                  throws TcTssException
Description copied from interface: TcINvRam
This method releases the space associated with the NV store instance. Note that this command requires owner authorization which can be set via the usage policy of the TPM object.

Specified by:
releaseSpace in interface TcINvRam
Throws:
TcTssException

writeValue

public void writeValue(long offset,
                       TcBlobData dataToWrite)
                throws TcTssException
Description copied from interface: TcINvRam
This method writes a given value to a previously defined area. If a policy object is assigned to this object, the authData within the policy object will be used to authorize this operation. If there is no policy object associated with this object, an unauthenticated write will be performed.

Specified by:
writeValue in interface TcINvRam
Parameters:
offset - The offset within the NV area to begin writing.
dataToWrite - The data to be written.
Throws:
TcTssException

changeAuth

public void changeAuth(TcIAuthObject parentObject,
                       TcIPolicy newPolicy)
                throws TcTssException
Description copied from interface: TcIAuthObject
This method changes the authorization data (secret) of an entity (object) and assigns the object to the newPolicy object. All classes using secrets provide this method for changing their authorization data. To change the TPM owner authorization, this method has to be called on the TPM object. The parent has to be set to null. To change the SRK authorization, this method has to be called on the SRK key object and the parent has to be set to the TPM object.

Specified by:
changeAuth in interface TcIAuthObject
Parameters:
parentObject - The parent object wrapping this object.
newPolicy - Policy object providing the new authorization data.
Throws:
TcTssException

setAttribNvIndex

public void setAttribNvIndex(long subFlag,
                             long attrib)
This method sets the TcTssConstants.TSS_TSPATTRIB_NV_INDEX attribute. Note that this method is not standardized as part of the TSPI.

Parameters:
subFlag - Ignored.
attrib - The index of the NV storage area associated with this object.
TSS Spec. 1.2 Errata A, page number:
377

setAttribNvPermissions

public void setAttribNvPermissions(long subFlag,
                                   long attrib)
This method sets the value of the permissions. Note that this method is not standardized as part of the TSPI.

Parameters:
subFlag - Ignored.
attrib - The value of the permissions.
TSS Spec. 1.2 Errata A, page number:
377

setAttrivNvDatasize

public void setAttrivNvDatasize(long subFlag,
                                long attrib)
This method sets the size of the defined NV storage area. Note that this method is not standardized as part of the TSPI.

Parameters:
subFlag - Ignored.
attrib - The size of the NV storage area.
TSS Spec. 1.2 Errata A, page number:
377

getAttribNvIndex

public long getAttribNvIndex(long subFlag)
This method returns the nvIndex currently set for this object. Note that this method is not standardized as part of the TSPI.

Parameters:
subFlag - Ignored.
Returns:
The NV index.
TSS Spec. 1.2 Errata A, page number:
378

getAttribNvPermissions

public long getAttribNvPermissions(long subFlag)
This method returns the nvPermissions currently set for this object. Note that this method is not standardized as part of the TSPI.

Parameters:
subFlag - Ignored.
Returns:
The NV permissions.
TSS Spec. 1.2 Errata A, page number:
378

getAttribNvDataSize

public long getAttribNvDataSize(long subFlag)
This method returns the NV data size currently set for this object. Note that this method is not standardized as part of the TSPI.

Parameters:
subFlag - Ignored.
Returns:
The NV data size.
TSS Spec. 1.2 Errata A, page number:
378

getAttribNvState

public long getAttribNvState(long subFlag)
                      throws TcTssException
This method returns NV state information as specified by subFlag. Note that this method is not standardized as part of the TSPI.

Parameters:
subFlag - Valid subFlags are:
Returns:
The requested data.
Throws:
{@link - TcTssException}
TcTssException
TSS Spec. 1.2 Errata A, page number:
378

getAttribNvPcrUint32

public long getAttribNvPcrUint32(long subFlag)
                          throws TcTssException
This method returns PCR information as specified by subFlag. Note that this method is not standardized as part of the TSPI.

Parameters:
subFlag - Valid subFlags are:
Returns:
The requested data.
Throws:
{@link - TcTssException}
TcTssException
TSS Spec. 1.2 Errata A, page number:
378

getAttribNvPcrData

public TcBlobData getAttribNvPcrData(long subFlag)
                              throws TcTssException
This method returns PCR information as specified by subFlag. Note that this method is not standardized as part of the TSPI.

Parameters:
subFlag - Valid subFlags are:
Returns:
The requested data.
Throws:
{@link - TcTssException}
TcTssException
TSS Spec. 1.2 Errata A, page number:
380