TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
attest.h File Reference
#include "psa/initial_attestation.h"
#include "psa/client.h"
#include "tfm_boot_status.h"
Include dependency graph for attest.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  psa_attest_err_t {
  PSA_ATTEST_ERR_SUCCESS = 0, PSA_ATTEST_ERR_INIT_FAILED, PSA_ATTEST_ERR_BUFFER_OVERFLOW, PSA_ATTEST_ERR_CLAIM_UNAVAILABLE,
  PSA_ATTEST_ERR_INVALID_INPUT, PSA_ATTEST_ERR_GENERAL, PSA_ATTEST_ERR_FORCE_INT_SIZE = INT_MAX
}
 Initial attestation service error types. More...
 

Functions

enum psa_attest_err_t attest_get_boot_data (uint8_t major_type, struct tfm_boot_data *boot_data, uint32_t len)
 Copy the boot data (coming from boot loader) from shared memory area to service memory area. More...
 
enum psa_attest_err_t attest_get_caller_client_id (int32_t *caller_id)
 Get the ID of the caller thread. More...
 
psa_status_t attest_init (void)
 Initialise the initial attestation service during the TF-M boot up process. More...
 
psa_status_t initial_attest_get_token (const psa_invec *in_vec, uint32_t num_invec, psa_outvec *out_vec, uint32_t num_outvec)
 Get initial attestation token. More...
 
psa_status_t initial_attest_get_token_size (const psa_invec *in_vec, uint32_t num_invec, psa_outvec *out_vec, uint32_t num_outvec)
 Get the size of the initial attestation token. More...
 
psa_status_t initial_attest_get_public_key (const psa_invec *in_vec, uint32_t num_invec, psa_outvec *out_vec, uint32_t num_outvec)
 Get the initial attestation public key. More...
 

Enumeration Type Documentation

Initial attestation service error types.

Enumerator
PSA_ATTEST_ERR_SUCCESS 

Action was performed successfully

PSA_ATTEST_ERR_INIT_FAILED 

Boot status data is unavailable or malformed

PSA_ATTEST_ERR_BUFFER_OVERFLOW 

Buffer is too small to store required data

PSA_ATTEST_ERR_CLAIM_UNAVAILABLE 

Some of the mandatory claims are unavailable

PSA_ATTEST_ERR_INVALID_INPUT 

Some parameter or combination of parameters are recognised as invalid:

  • challenge size is not allowed
  • challenge object is unavailable
  • token buffer is unavailable
PSA_ATTEST_ERR_GENERAL 

Unexpected error happened during operation

PSA_ATTEST_ERR_FORCE_INT_SIZE 

Following entry is only to ensure the error code of integer size

Definition at line 25 of file attest.h.

Function Documentation

enum psa_attest_err_t attest_get_boot_data ( uint8_t  major_type,
struct tfm_boot_data boot_data,
uint32_t  len 
)

Copy the boot data (coming from boot loader) from shared memory area to service memory area.

Parameters
[in]major_typeMajor type of TLV entries to copy
[out]boot_dataPointer to the buffer to store the boot data
[in]lenSize of the buffer to store the boot data
Returns
Returns error code as specified in psa_attest_err_t

Definition at line 38 of file tfm_attest.c.

Here is the call graph for this function:

Here is the caller graph for this function:

enum psa_attest_err_t attest_get_caller_client_id ( int32_t *  caller_id)

Get the ID of the caller thread.

Parameters
[out]caller_idPointer where to store caller ID
Returns
Returns error code as specified in psa_attest_err_t

Definition at line 20 of file tfm_attest.c.

Here is the call graph for this function:

psa_status_t attest_init ( void  )

Initialise the initial attestation service during the TF-M boot up process.

Returns
Returns PSA_SUCCESS if init has been completed, otherwise error as specified in psa_status_t

Definition at line 99 of file attest_core.c.

Here is the call graph for this function:

Here is the caller graph for this function:

psa_status_t initial_attest_get_public_key ( const psa_invec in_vec,
uint32_t  num_invec,
psa_outvec out_vec,
uint32_t  num_outvec 
)

Get the initial attestation public key.

Parameters
[in]in_vecPointer to in_vec array, which contains input data to attestation service
[in]num_invecNumber of elements in in_vec array
[out]out_vecPointer to out_vec array, which contains pointer where to store the output data
[in]num_outvecNumber of elements in out_vec array
Returns
Returns error code as specified in psa_status_t

Definition at line 922 of file attest_core.c.

Here is the call graph for this function:

psa_status_t initial_attest_get_token ( const psa_invec in_vec,
uint32_t  num_invec,
psa_outvec out_vec,
uint32_t  num_outvec 
)

Get initial attestation token.

Parameters
[in]in_vecPointer to in_vec array, which contains input data to attestation service
[in]num_invecNumber of elements in in_vec array
[in,out]out_vecPointer out_vec array, which contains output data to attestation service
[in]num_outvecNumber of elements in out_vec array
Returns
Returns error code as specified in psa_status_t

Definition at line 833 of file attest_core.c.

psa_status_t initial_attest_get_token_size ( const psa_invec in_vec,
uint32_t  num_invec,
psa_outvec out_vec,
uint32_t  num_outvec 
)

Get the size of the initial attestation token.

Parameters
[in]in_vecPointer to in_vec array, which contains input data to attestation service
[in]num_invecNumber of elements in in_vec array
[out]out_vecPointer to out_vec array, which contains pointer where to store the output data
[in]num_outvecNumber of elements in out_vec array
Returns
Returns error code as specified in psa_status_t

Definition at line 869 of file attest_core.c.