SecurityProviderTPMEmulator Class

public class SecurityProviderTPMEmulator extends SecurityProviderTpm

Constructor Summary

Constructor Description
SecurityProviderTPMEmulator()

Constructor for creating a Security Provider on TPM Simulator

SecurityProviderTPMEmulator(String registrationId)

Constructor for creating a Security Provider on TPM Simulator with the supplied Registration ID

SecurityProviderTPMEmulator(String registrationId, int tpmConnectRetryAttempts)

Constructor for creating a Security Provider on TPM Simulator with the supplied Registration ID

SecurityProviderTPMEmulator(String registrationId, String ipAddressSimulator)

Constructor for creating a Security Provider on TPM Simulator with the supplied Registration ID and ip address of the the remote where TPM simulator is running

Method Summary

Modifier and Type Method and Description
byte [] activateIdentityKey(byte[] key)

Activates the Identity with the nonce provided from the service

byte [] getEndorsementKey()

Getter for extracting EndorsementKey from TPM

String getRegistrationId()

Getter for the Registration ID if it was provided. Default is returned otherwise.

byte [] getStorageRootKey()

Getter for extracting StorageRootKey from TPM

Tpm localTpmSimulatorWithRetry(int retryAttempts)
void shutDown()

Closes the simulator if it were running already

byte [] signWithIdentity(byte[] deviceIdData)

This method signs the TPM with the provided device ID

Inherited Members

Constructor Details

SecurityProviderTPMEmulator

public SecurityProviderTPMEmulator()

Constructor for creating a Security Provider on TPM Simulator

Throws:

SecurityProviderException - If the constructor could not start the TPM

SecurityProviderTPMEmulator

public SecurityProviderTPMEmulator(String registrationId)

Constructor for creating a Security Provider on TPM Simulator with the supplied Registration ID

Parameters:

registrationId -

A nonnull 

</code> or empty value tied to this registration </p>

Throws:

SecurityProviderException - If the constructor could not start the TPM

SecurityProviderTPMEmulator

public SecurityProviderTPMEmulator(String registrationId, int tpmConnectRetryAttempts)

Constructor for creating a Security Provider on TPM Simulator with the supplied Registration ID

Parameters:

registrationId -

A nonnull 

</code> or empty value tied to this registration </p>
tpmConnectRetryAttempts

Throws:

SecurityProviderException - If the constructor could not start the TPM

SecurityProviderTPMEmulator

public SecurityProviderTPMEmulator(String registrationId, String ipAddressSimulator)

Constructor for creating a Security Provider on TPM Simulator with the supplied Registration ID and ip address of the the remote where TPM simulator is running

Parameters:

registrationId -

A nonnull 

</code> or empty value tied to this registration </p>
ipAddressSimulator -

A nonnull 

</code> or empty value of the ip address on which simulator is running. </p>

Throws:

SecurityProviderException - If the constructor could not start the TPM

Method Details

activateIdentityKey

public byte [] activateIdentityKey(byte[] key)

Activates the Identity with the nonce provided from the service

Parameters:

key - Key for activating the TPM

Returns:

null 

</code> value is returned. Place holder for eventual returns. </p>

Throws:

SecurityProviderException - If activation was not successful.

getEndorsementKey

public byte [] getEndorsementKey()

Getter for extracting EndorsementKey from TPM

Returns:

The Endorsement Key from TPM

getRegistrationId

public String getRegistrationId()

Getter for the Registration ID if it was provided. Default is returned otherwise.

Returns:

The registration ID tied to this registration instance

Throws:

SecurityProviderException - If registration ID could not be extracted

getStorageRootKey

public byte [] getStorageRootKey()

Getter for extracting StorageRootKey from TPM

Returns:

The StorageRootKey from TPM

localTpmSimulatorWithRetry

public static Tpm localTpmSimulatorWithRetry(int retryAttempts)

Parameters:

retryAttempts

shutDown

public void shutDown()

Closes the simulator if it were running already

Throws:

SecurityProviderException - if simulator could not be closed for any reason.

signWithIdentity

public byte [] signWithIdentity(byte[] deviceIdData)

This method signs the TPM with the provided device ID

Parameters:

deviceIdData -

A nonnull 

</code> or empty value for the device ID </p>

Returns:

The signature after signing data.

Throws:

SecurityProviderException - If signing was not successful

Applies to