Mistake on this page?
Report an issue in GitHub or email us
Functions
Client-API

The C interface for connecting to a Root of Trust Service and calling it. More...

Functions

uint32_t psa_framework_version (void)
 Retrieve the version of the PSA Framework API that is implemented. More...
 
uint32_t psa_version (uint32_t sid)
 Retrieve the minor version of a Root of Trust Service by its SID. More...
 
psa_handle_t psa_connect (uint32_t sid, uint32_t minor_version)
 Connect to a Root of Trust Service by its SID. More...
 
psa_status_t psa_call (psa_handle_t handle, const psa_invec *in_vec, size_t in_len, const psa_outvec *out_vec, size_t out_len)
 Call a connected Root of Trust Service. More...
 
void psa_close (psa_handle_t handle)
 Close a connection to a Root of Trust Service. More...
 

Detailed Description

The C interface for connecting to a Root of Trust Service and calling it.


All functions are blocking.

Function Documentation

psa_status_t psa_call ( psa_handle_t  handle,
const psa_invec in_vec,
size_t  in_len,
const psa_outvec out_vec,
size_t  out_len 
)

Call a connected Root of Trust Service.


The caller must provide an array of psa_invec structures as the input payload.

Parameters
[in]handleHandle for the connection.
[in]in_vecArray of psa_invec structures.
[in]in_lenNumber of psa_invec structures in in_vec. (At most PSA_MAX_IOVEC - out_len)
[out]out_vecArray of psa_outvec structures for optional Root of Trust Service response.
[in]out_lenNumber of psa_outvec structures in out_vec. (At most PSA_MAX_IOVEC - in_len)
Returns
0 for success or
positive numbers for application-specific return code. negative numbers for application-specific error code. PSA_DROP_CONNECTION if the connection has been dropped by the RoT Service.
void psa_close ( psa_handle_t  handle)

Close a connection to a Root of Trust Service.

Sends the PSA_IPC_DISCONNECT message to the Root of Trust Service, so it can clean up resources.

Parameters
[in]handleHandle for the connection.
psa_handle_t psa_connect ( uint32_t  sid,
uint32_t  minor_version 
)

Connect to a Root of Trust Service by its SID.

Note
A minor version number must be provided to allow the Root of Trust Service to handle minor variations of the protocol.
Parameters
[in]sidThe Root of Trust Service ID.
[in]minor_versionThe minor version to be used for this connection.
Returns
A handle for the connection if greater than 0, else:
PSA_CONNECTION_REFUSED if the Root of Trust Service cannot handle any more connections.
uint32_t psa_framework_version ( void  )

Retrieve the version of the PSA Framework API that is implemented.

Note
The PSA Framework API version is made of the major and minor versions as follows:
1 ((major_version << 8) | minor_version)
Returns
The PSA Framework API version
uint32_t psa_version ( uint32_t  sid)

Retrieve the minor version of a Root of Trust Service by its SID.

Parameters
[in]sidThe Root of Trust Service ID
Returns
Minor version of Root of Trust Service or PSA_VERSION_NONE if Root of Trust Service is not present on the system.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.