blob: 356132d08d42dcbdc3dad47efbe10eac447d8aae [file] [log] [blame]
Tamas Ban48a0eb52018-08-17 12:48:05 +01001/*
Tamas Ban2318feb2019-01-02 16:50:51 +00002 * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
Tamas Ban48a0eb52018-08-17 12:48:05 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __ATTESTATION_H__
9#define __ATTESTATION_H__
10
11#include "psa_initial_attestation_api.h"
12#include "psa_client.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
Tamas Ban48a0eb52018-08-17 12:48:05 +010018/*!
19 * \brief Initialise the initial attestation service during the TF-M boot up
20 * process.
21 *
22 * \return Returns PSA_ATTEST_ERR_SUCCESS if init has been completed,
23 * otherwise error as specified in \ref psa_attest_err_t
24 */
25enum psa_attest_err_t attest_init(void);
26
27/*!
28 * \brief Get initial attestation token
29 *
30 * \param[in] in_vec Pointer to in_vec array, which contains input data
31 * to attestation service
32 * \param[in] num_invec Number of elements in in_vec array
33 * \param[in/out] out_vec Pointer out_vec array, which contains output data
34 * to attestation service
35 * \param[in] num_outvec Number of elements in out_vec array
36 *
37 * \return Returns error code as specified in \ref psa_attest_err_t
38 */
39enum psa_attest_err_t
40initial_attest_get_token(const psa_invec *in_vec, uint32_t num_invec,
41 psa_outvec *out_vec, uint32_t num_outvec);
42
Tamas Banb6b80562019-01-04 22:49:24 +000043/**
44 * \brief Get the size of the initial attestation token
45 *
46 * \param[in] in_vec Pointer to in_vec array, which contains input data
47 * to attestation service
48 * \param[in] num_invec Number of elements in in_vec array
49 * \param[out] out_vec Pointer to out_vec array, which contains pointer
50 * where to store the output data
51 * \param[in] num_outvec Number of elements in out_vec array
52 *
53 * \return Returns error code as specified in \ref psa_attest_err_t
54 */
55enum psa_attest_err_t
56initial_attest_get_token_size(const psa_invec *in_vec, uint32_t num_invec,
57 psa_outvec *out_vec, uint32_t num_outvec);
Tamas Ban48a0eb52018-08-17 12:48:05 +010058#ifdef __cplusplus
59}
60#endif
61
62#endif /* __ATTESTATION_H__ */