tpm2-tss  3.2.0
TPM Software stack 2.0 TCG spec compliant implementation
Fapi-Testing

Functions

int test_fapi_data_crypt (FAPI_CONTEXT *context)
 
int test_fapi_duplicate (FAPI_CONTEXT *context)
 
int test_fapi_ext_public_key (FAPI_CONTEXT *context)
 
int test_fapi_get_random (FAPI_CONTEXT *context)
 
int test_fapi_info (FAPI_CONTEXT *context)
 
int test_fapi_key_change_auth (FAPI_CONTEXT *context)
 
int test_fapi_key_create_ckda_sign (FAPI_CONTEXT *context)
 
int test_fapi_key_create_policies_sign (FAPI_CONTEXT *context)
 
int test_fapi_key_create_policy_authorize_nv (FAPI_CONTEXT *context)
 
int test_fapi_key_create_policy_authorize_sign (FAPI_CONTEXT *context)
 
int test_fapi_key_create_policy_nv_sign (FAPI_CONTEXT *context)
 
int test_fapi_key_create_policy_or_sign (FAPI_CONTEXT *context)
 
int test_fapi_key_create_policy_pcr_sign (FAPI_CONTEXT *context)
 
int test_fapi_key_create_policy_secret_nv_sign (FAPI_CONTEXT *context)
 
int test_fapi_key_create_policy_signed (FAPI_CONTEXT *context)
 
int test_fapi_key_create_sign (FAPI_CONTEXT *context)
 
int test_fapi_key_create_sign_password_provision (FAPI_CONTEXT *context)
 
int test_fapi_key_create_sign_policy_provision (FAPI_CONTEXT *context)
 
int test_fapi_nv_extend (FAPI_CONTEXT *context)
 
int test_fapi_nv_increment (FAPI_CONTEXT *context)
 
int test_fapi_nv_ordinary (FAPI_CONTEXT *context)
 
int test_fapi_nv_set_bits (FAPI_CONTEXT *context)
 
int test_fapi_nv_written_policy (FAPI_CONTEXT *context)
 
int test_fapi_pcr_test (FAPI_CONTEXT *context)
 
int test_fapi_platform_certificates (FAPI_CONTEXT *context)
 
int test_fapi_quote (FAPI_CONTEXT *context)
 
int test_fapi_unseal (FAPI_CONTEXT *context)
 

Detailed Description

Testing of FAPI functionality. The tested FAPI functions are listed in each of the testcase functions' descriptions.

Function Documentation

◆ test_fapi_data_crypt()

test_fapi_data_crypt ( FAPI_CONTEXT context)

Test the FAPI functions for encryption and decryption.

Tested FAPI commands:

Tested Policies:

  • PolicySigned
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_duplicate()

test_fapi_duplicate ( FAPI_CONTEXT context)

Test the FAPI functions for key duplication.

Tested FAPI commands:

Tested Policies:

  • PolicyDuplicationSelect
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_ext_public_key()

test_fapi_ext_public_key ( FAPI_CONTEXT context)

Test the FAPI functions use an external public key for signature and quote verify without TPM.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_get_random()

test_fapi_get_random ( FAPI_CONTEXT context)

Test the FAPI function FAPI_GetRandom and async invocations.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_info()

test_fapi_info ( FAPI_CONTEXT context)

Test the FAPI functions for GetInfo.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_change_auth()

test_fapi_key_change_auth ( FAPI_CONTEXT context)

Test the FAPI function for changing key authorizations.

The setting of the authorization callback and usage of the key with Fapi_Sign afterwards is also tested.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_ckda_sign()

test_fapi_key_create_ckda_sign ( FAPI_CONTEXT context)

Test the FAPI functions for key creation and usage with noda and da flag.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_policies_sign()

test_fapi_key_create_policies_sign ( FAPI_CONTEXT context)

Test several FAPI policies by usage of signing key.

Which test case will be executed is determined by the compiler switches: TEST_POLICY_PASSWORD, TEST_POLICY_AUTH_VALUE, TEST_POLICY_LOCALITY TEST_POLICY_PHYSICAL_PRESENCE, TEST_POLICY_COMMAND_CODE, TEST_POLICY_COUNTERTIMER.

Tested FAPI commands:

Tested Policies:

  • PolicyPassword
  • PolicyAuthValue
  • PolicyLocality
  • PolicyPhysicalPresence
  • PolicyCommandCode
  • PolicyCounterTimer
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_policy_authorize_nv()

test_fapi_key_create_policy_authorize_nv ( FAPI_CONTEXT context)

Test the FAPI key signing with PolicyAuthorizeNV.

Tested FAPI commands:

Tested Policies:

  • PolicyAuthorizeNv
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_policy_authorize_sign()

test_fapi_key_create_policy_authorize_sign ( FAPI_CONTEXT context)

Test the FAPI functions for PolicyAuthoirze with signing.

Tested FAPI commands:

Tested Policies:

  • PolicyNameHash
  • PolicyAuthorize
  • PolicyCpHash (Not entered, only as alternative branch)
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_policy_nv_sign()

test_fapi_key_create_policy_nv_sign ( FAPI_CONTEXT context)

Test the FAPI functions for NV writing and key usage.

Tested FAPI commands:

Tested Policies:

  • PolicyNv
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_policy_or_sign()

test_fapi_key_create_policy_or_sign ( FAPI_CONTEXT context)

Test the FAPI for PolicyOr using signing.

Tested FAPI commands:

Tested Policies:

  • PolicyOr
  • PolicyPcr
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_policy_pcr_sign()

test_fapi_key_create_policy_pcr_sign ( FAPI_CONTEXT context)

Test the FAPI functions for PolicyPCR with key creation and usage.

Tested FAPI commands:

Tested Policies:

  • PolicyPcr (with currentPCRs set)
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_policy_secret_nv_sign()

test_fapi_key_create_policy_secret_nv_sign ( FAPI_CONTEXT context)

Test the FAPI PolicySecret and PolicyAuthValue handling.

Tested FAPI commands:

Tested Policies:

  • PolicySecret
  • PolicyAuthValue
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_policy_signed()

test_fapi_key_create_policy_signed ( FAPI_CONTEXT context)

Test the FAPI functions for key creation and usage with a PolicySigned.

Tested FAPI commands:

Tested Policies:

  • PolicySigned
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_sign()

test_fapi_key_create_sign ( FAPI_CONTEXT context)

Test the FAPI functions for TpmBlobs and certificates.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_sign_password_provision()

test_fapi_key_create_sign_password_provision ( FAPI_CONTEXT context)

Test the FAPI functions for key creation and usage with an SH password.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_key_create_sign_policy_provision()

test_fapi_key_create_sign_policy_provision ( FAPI_CONTEXT context)

Test the FAPI functions for key creation and usage.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_nv_extend()

test_fapi_nv_extend ( FAPI_CONTEXT context)

Test the FAPI function FAPI_NvExtend.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_nv_increment()

test_fapi_nv_increment ( FAPI_CONTEXT context)

Test the FAPI function FAPI_NvIncrement.

Tested FAPI commands:

Tested Policies:

  • PolicyAuthValue
  • PolicyCommandCode
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_nv_ordinary()

test_fapi_nv_ordinary ( FAPI_CONTEXT context)

Test the FAPI NV functions.

Tested FAPI commands:

Tested Policies:

  • PolicyAction
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_nv_set_bits()

test_fapi_nv_set_bits ( FAPI_CONTEXT context)

Test the FAPI function Fapi_NvSetBits.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_nv_written_policy()

test_fapi_nv_written_policy ( FAPI_CONTEXT context)

Test the FAPI policy PolicyNvWritten.

Tested FAPI commands:

Tested Policies:

  • PolicyNvWritten
Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_pcr_test()

test_fapi_pcr_test ( FAPI_CONTEXT context)

Test the FAPI function FAPI_PcrExtend and Read.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_platform_certificates()

test_fapi_platform_certificates ( FAPI_CONTEXT context)

Test the FAPI functions for platform certificates.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_quote()

test_fapi_quote ( FAPI_CONTEXT context)

Test the FAPI functions for quote commands.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS

◆ test_fapi_unseal()

test_fapi_unseal ( FAPI_CONTEXT context)

Test the FAPI functions for sealing.

Tested FAPI commands:

Parameters
[in,out]contextThe FAPI_CONTEXT.
Return values
EXIT_FAILURE
EXIT_SUCCESS