iaik.tc.tss.api.tspi
Interface TcIAttributes

All Known Subinterfaces:
TcIContext, TcIEncData, TcIHash, TcIMigData, TcIMonotonicCtr, TcINvRam, TcIPcrComposite, TcIPolicy, TcIRsaKey, TcITpm

public interface TcIAttributes

This interface defines methods that are in common for all objects that support setting or getting UINT32 and data attributes.


Method Summary
 TcBlobData getAttribData(long attribFlag, long subFlag)
          This method gets a non UINT32 attribute of the object (i.e.
 long getAttribUint32(long attribFlag, long subFlag)
          This method gets an UINT32 attribute of the object.
 void setAttribData(long attribFlag, long subFlag, TcBlobData attrib)
          This method sets a non UINT32 attribute (i.e.
 void setAttribUint32(long attribFlag, long subFlag, long attrib)
          This method sets an UINT32 attribute of the object.
 

Method Detail

getAttribData

TcBlobData getAttribData(long attribFlag,
                         long subFlag)
                         throws TcTssException
This method gets a non UINT32 attribute of the object (i.e. a binary data blob). The structure and size of the returned data depends on the attribute.

Parameters:
attribFlag - Flag indicating the attribute to get. Attribute Flags are prefixed with TSS_TSPATTRIB_ and are defined in TcTssConstants. Valid attributes depend on the actual type of the object this method is called for.

Valid attribFlags for Context objects are: Valid attribFlags for Policy objects are: Valid attribFlags for EncData objects are: Valid attribFlags for Key objects are:
subFlag - Sub flag indicating the attribute to get.

Valid subFlags for EncData objects are: Valid subFlags for Key objects are: Note: If an attribFlag does not take a subFlag, the subFlag might be set to 0.
Returns:
Buffer containing to the actual data of the specified attribute.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
177
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
70

setAttribData

void setAttribData(long attribFlag,
                   long subFlag,
                   TcBlobData attrib)
                   throws TcTssException
This method sets a non UINT32 attribute (i.e. a binary data blob) of the object. The structure and size of the data data depends on the attribute.

Parameters:
attribFlag - Flag indicating the attribute to set. Attribute Flags are prefixed with TSS_TSPATTRIB_ and are defined in TcTssConstants. Valid attributes depend on the actual type of the object this method is called for.

Valid attribFlags for Policy objects are: Valid attribFlags for EncData objects are: Valid attribFlags for Hash objects are: Valid attribFlags for Key objects are:
subFlag - Sub flag indicating the attribute to set.

Valid subFlags for EncData objects are: Valid subFlags for Key objects are: Note: If an attribFlag does not take a subFlag, the subFlag might be set to 0.
attrib - the actual data which is to be set for the specified attribute
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
175
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
69

getAttribUint32

long getAttribUint32(long attribFlag,
                     long subFlag)
                     throws TcTssException
This method gets an UINT32 attribute of the object.

Parameters:
attribFlag - Flag indicating the attribute to query. Attribute Flags are prefixed with TSS_TSPATTRIB_ and are defined in TcTssConstants. Valid attributes depend on the actual type of the object this method is called for.

Valid attribFlags for Context objects are:
Valid attribFlags for Policy objects are: Valid attribFlags for Key objects are:
subFlag - Sub flag indicating the attribute to query. Sub-Flags are prefixed with TSS_TSPATTRIB_ and are defined in TcTssConstants.

Valid subFlags for Policy objects are: Valid subFlags for Key objects are: Note: If an attribFlag does not take a subFlag, the subFlag might be set to 0.
Returns:
The value of the specified attribute Note: The returned UINT32 is represented by a Java long data type to avoid problems when converting from unsigned C types to singed Java types.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
174
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
77

setAttribUint32

void setAttribUint32(long attribFlag,
                     long subFlag,
                     long attrib)
                     throws TcTssException
This method sets an UINT32 attribute of the object. If the data being set is smaller than an UINT32, casting must be used to get the data to the right size.

Parameters:
attribFlag - Flag indicating the attribute to set. Attribute Flags are prefixed with TSS_TSPATTRIB_ and are defined in TcTpmConstants. Valid attributes depend on the actual type of the object this method is called for.

Valid attribFlags for Context objects are: Valid attribFlags for Policy objects are: Valid attribFlags for Key objects are:
subFlag - Sub flag indicating the attribute to set. Sub-Flags are prefixed with TSS_TSPATTRIB_ and are defined in TcTssConstants.

Valid subFlags for Policy objects are: Valid subFlags for Key objects are: Note: If an attribFlag does not take a subFlag, the subFlag might be set to 0.
attrib - Value which is to be set for the specified attribute. Only non-negative arguments are allowed. Note: The UINT32 is represented by a Java long data type to avoid problems when converting from singed Java types to unsigned C types.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
172
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
76