|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.tc.tss.impl.java.tsp.TcAttributes
public abstract class TcAttributes
This class implements the attribute handling for TSS working objects. The TSS specification
defines two basic attribute types: UINT32 attributes and data (byte array) attributes. For both
attribute types, generic getter and setter methods are defined (TcIAttributes.setAttribData(long, long, TcBlobData)
,
TcIAttributes.getAttribData(long, long)
,
TcIAttributes.setAttribUint32(long, long, long)
and
TcIAttributes.getAttribUint32(long, long)
). The first parameter always is the flag and
the second one the subFlag. Together they define the attribute to get/set. To allow a more
convenient form of implementation, for every flag an own getter and setter method is implemented
in the working objects. To be compatible with the generic getter and setter methods defined by
the TSS specification, this class provides these generic methods that map incoming calls to the
actual getter and setter methods of the working object. To do that, each working object has to
register its attribute getter and setter methods together with the corresponding flag value. This
is done by implementing the abstract initAttribGetters and initAttribSetters methods.
Constructor Summary | |
---|---|
TcAttributes()
The abstract initialization methods (to be implemented by the inheriting working object) are called to allow the working object to establish the "flag to getter/setter method" mappings. |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TcAttributes()
Method Detail |
---|
public TcBlobData getAttribData(long attribFlag, long subFlag) throws TcTssException
TcIAttributes
getAttribData
in interface TcIAttributes
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. TcTssConstants.TSS_TSPATTRIB_KEY_BLOB
TcTssConstants.TSS_TSPATTRIB_KEY_INFO
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
TcTssConstants.TSS_TSPATTRIB_KEY_UUID
. To get this attribute as an
TcTssUuid
instead of a blob use
TcIRsaKey.getAttribUuid()
TcTssConstants.TSS_TSPATTRIB_KEY_PCR
subFlag
- Sub flag indicating the attribute to get. TcTssConstants.TSS_TSPATTRIB_ENCDATABLOB_BLOB
TcTssConstants.TSS_TSPATTRIB_ENCDATAPCR_DIGEST_ATCREATION
TcTssConstants.TSS_TSPATTRIB_ENCDATAPCR_DIGEST_RELEASE
TcTssConstants.TSS_TSPATTRIB_ENCDATAPCR_SELECTION
TcTssConstants.TSS_TSPATTRIB_KEYBLOB_BLOB
TcTssConstants.TSS_TSPATTRIB_KEYBLOB_PRIVATE_KEY
TcTssConstants.TSS_TSPATTRIB_KEYBLOB_PUBLIC_KEY
TcTssConstants.TSS_TSPATTRIB_KEYINFO_VERSION
. To get this attribute as
an TcTssVersion
instead of a blob use
TcIRsaKey.getAttribKeyInfoVersion()
TcTssConstants.TSS_TSPATTRIB_KEYINFO_RSA_EXPONENT
TcTssConstants.TSS_TSPATTRIB_KEYINFO_RSA_MODULUS
TcTssConstants.TSS_TSPATTRIB_KEYPCR_DIGEST_ATCREATION
TcTssConstants.TSS_TSPATTRIB_KEYPCR_DIGEST_ATRELEASE
TcTssConstants.TSS_TSPATTRIB_KEYPCR_SELECTION
TcTssException
public long getAttribUint32(long attribFlag, long subFlag) throws TcTssException
TcIAttributes
getAttribUint32
in interface TcIAttributes
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. TcTssConstants.TSS_TSPATTRIB_POLICY_CALLBACK_HMAC
TcTssConstants.TSS_TSPATTRIB_POLICY_CALLBACK_XOR_ENC
TcTssConstants.TSS_TSPATTRIB_POLICY_CALLBACK_TAKEOWNERSHIP
TcTssConstants.TSS_TSPATTRIB_POLICY_CALLBACK_CHANGEAUTHASYM
TcTssConstants.TSS_TSPATTRIB_POLICY_SECRET_LIFETIME
TcTssConstants.TSS_TSPATTRIB_KEY_REGISTER
TcTssConstants.TSS_TSPATTRIB_KEY_INFO
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
subFlag
- Sub flag indicating the attribute to query. Sub-Flags are prefixed with
TSS_TSPATTRIB_ and are defined in TcTssConstants
. TcTssConstants.TSS_TSPATTRIB_POLICYSECRET_LIFETIME_ALWAYS
TcTssConstants.TSS_TSPATTRIB_POLICYSECRET_LIFETIME_COUNTER
TcTssConstants.TSS_TSPATTRIB_POLICYSECRET_LIFETIME_TIMER
TcTssConstants.TSS_TSPATTRIB_KEYINFO_USAGE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_MIGRATABLE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_REDIRECTED
TcTssConstants.TSS_TSPATTRIB_KEYINFO_VOLATILE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_AUTHDATAUSAGE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_ALGORITHM
TcTssConstants.TSS_TSPATTRIB_KEYINFO_ENCSCHEME
TcTssConstants.TSS_TSPATTRIB_KEYINFO_SIGSCHEME
TcTssConstants.TSS_TSPATTRIB_KEYINFO_KEYFLAGS
TcTssConstants.TSS_TSPATTRIB_KEYINFO_AUTHUSAGE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_RSA_KEYSIZE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_RSA_PRIMES
TcTssException
public void setAttribData(long attribFlag, long subFlag, TcBlobData attrib) throws TcTssException
TcIAttributes
setAttribData
in interface TcIAttributes
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. subFlag
- Sub flag indicating the attribute to set. TcTssConstants.TSS_TSPATTRIB_KEYBLOB_BLOB
TcTssConstants.TSS_TSPATTRIB_KEYBLOB_PRIVATE_KEY
TcTssConstants.TSS_TSPATTRIB_KEYBLOB_PUBLIC_KEY
attrib
- the actual data which is to be set for the specified attribute
TcTssException
public void setAttribUint32(long attribFlag, long subFlag, long attrib) throws TcTssException
TcIAttributes
setAttribUint32
in interface TcIAttributes
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.
TcTssConstants.TSS_TSPATTRIB_POLICY_CALLBACK_HMAC
TcTssConstants.TSS_TSPATTRIB_POLICY_CALLBACK_XOR_ENC
TcTssConstants.TSS_TSPATTRIB_POLICY_CALLBACK_TAKEOWNERSHIP
TcTssConstants.TSS_TSPATTRIB_POLICY_CALLBACK_CHANGEAUTHASYM
TcTssConstants.TSS_TSPATTRIB_POLICY_SECRET_LIFETIME
TcTssConstants.TSS_TSPATTRIB_KEY_BLOB
TcTssConstants.TSS_TSPATTRIB_KEY_INFO
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
subFlag
- Sub flag indicating the attribute to set. Sub-Flags are prefixed with
TSS_TSPATTRIB_ and are defined in TcTssConstants
. TcTssConstants.TSS_TSPATTRIB_POLICYSECRET_LIFETIME_ALWAYS
TcTssConstants.TSS_TSPATTRIB_POLICYSECRET_LIFETIME_COUNTER
TcTssConstants.TSS_TSPATTRIB_POLICYSECRET_LIFETIME_TIMER
TcTssConstants.TSS_TSPATTRIB_KEYINFO_USAGE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_MIGRATABLE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_REDIRECTED
TcTssConstants.TSS_TSPATTRIB_KEYINFO_VOLATILE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_AUTHDATAUSAGE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_ALGORITHM
TcTssConstants.TSS_TSPATTRIB_KEYINFO_ENCSCHEME
TcTssConstants.TSS_TSPATTRIB_KEYINFO_SIGSCHEME
TcTssConstants.TSS_TSPATTRIB_KEYINFO_SIZE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_KEYFLAGS
TcTssConstants.TSS_TSPATTRIB_KEYINFO_AUTHUSAGE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_RSA_PRIMES
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.
TcTssException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |