iaik.tc.tss.impl.java.tcs
Class TcTcsCommon

java.lang.Object
  extended by iaik.tc.tss.impl.java.tcs.TcTcsCommon

public class TcTcsCommon
extends java.lang.Object

This class provides methods that are commonly used throughout the TCS. This includes e.g. checking if a specific command ordinal is supported by the TPM. One example is to determine if LoadKey oder LoadKey2 should be used.


Field Summary
static java.lang.String TPM_MAN_ETHZ
          TPM manufacturer string for TPM emulator.
 
Constructor Summary
TcTcsCommon()
           
 
Method Summary
static long getNumPcrs()
          This method returns the number of PCRs supported by the TPM.
static boolean isOrdinalSupported(long ordinal)
          This method allows to check if a given command ordinal is supported by the TPM.
static boolean isOrdinalSupported(TcTddl tddl, long ordinal)
          This method allows to check if a given command ordinal is supported by the TPM.
static boolean tpmManufacturerIs(java.lang.String manString)
          This method checks if the manufacturer string of the TPM matches the provided one.
static boolean tpmManufacturerIs(TcTddl tddl, java.lang.String manString)
          This method checks if the manufacturer string of the TPM matches the provided one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TPM_MAN_ETHZ

public static java.lang.String TPM_MAN_ETHZ
TPM manufacturer string for TPM emulator.

Constructor Detail

TcTcsCommon

public TcTcsCommon()
Method Detail

isOrdinalSupported

public static boolean isOrdinalSupported(long ordinal)
                                  throws TcTddlException,
                                         TcTpmException
This method allows to check if a given command ordinal is supported by the TPM. The same functionality can be achieved using the getCapability functionality to check for supported ordinals. This method however, is simpler to use and additionally provides caching of the results. In cases where the same ordinal is queried more than once, this method avoids the calls to the TPM.

Parameters:
ordinal - The TPM command ordinal to be checked.
Returns:
Returns true if the ordinal is supported, false otherwise.
Throws:
{@link - TcTddlException}
{@link - TcTpmException}
TcTddlException
TcTpmException

isOrdinalSupported

public static boolean isOrdinalSupported(TcTddl tddl,
                                         long ordinal)
                                  throws TcTddlException,
                                         TcTpmException
This method allows to check if a given command ordinal is supported by the TPM. The same functionality can be achieved using the getCapability functionality to check for supported ordinals. This method however, is simpler to use and additionally provides caching of the results. In cases where the same ordinal is queried more than once, this method avoids the calls to the TPM.

Parameters:
tddl - The TcTddl to use.
ordinal - The TPM command ordinal to be checked.
Returns:
Returns true if the ordinal is supported, false otherwise.
Throws:
{@link - TcTddlException}
{@link - TcTpmException}
TcTddlException
TcTpmException

tpmManufacturerIs

public static boolean tpmManufacturerIs(java.lang.String manString)
                                 throws TcTddlException,
                                        TcTpmException
This method checks if the manufacturer string of the TPM matches the provided one.

Throws:
TcTddlException
TcTpmException

tpmManufacturerIs

public static boolean tpmManufacturerIs(TcTddl tddl,
                                        java.lang.String manString)
                                 throws TcTddlException,
                                        TcTpmException
This method checks if the manufacturer string of the TPM matches the provided one.

Throws:
TcTddlException
TcTpmException

getNumPcrs

public static long getNumPcrs()
                       throws TcTddlException,
                              TcTpmException
This method returns the number of PCRs supported by the TPM.

Throws:
TcTddlException
TcTpmException