blob: 03b9636d29e4937005deb80933e8db10236e176c [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
18/* Extension of shared data TLVs defined in bl2/include/tfm_boot_status.h */
Tamas Bane2acf5f2019-01-02 18:59:41 +000019#define TLV_MINOR_IAS_BOOT_SEED 0x0f
20#define TLV_MINOR_IAS_INSTANCE_ID 0x10
21#define TLV_MINOR_IAS_CHALLENGE 0x11
22#define TLV_MINOR_IAS_CALLER_ID 0x12
23#define TLV_MINOR_IAS_IMPLEMENTATION_ID 0x13
Tamas Ban48a0eb52018-08-17 12:48:05 +010024
25/*!
26 * \brief Initialise the initial attestation service during the TF-M boot up
27 * process.
28 *
29 * \return Returns PSA_ATTEST_ERR_SUCCESS if init has been completed,
30 * otherwise error as specified in \ref psa_attest_err_t
31 */
32enum psa_attest_err_t attest_init(void);
33
34/*!
35 * \brief Get initial attestation token
36 *
37 * \param[in] in_vec Pointer to in_vec array, which contains input data
38 * to attestation service
39 * \param[in] num_invec Number of elements in in_vec array
40 * \param[in/out] out_vec Pointer out_vec array, which contains output data
41 * to attestation service
42 * \param[in] num_outvec Number of elements in out_vec array
43 *
44 * \return Returns error code as specified in \ref psa_attest_err_t
45 */
46enum psa_attest_err_t
47initial_attest_get_token(const psa_invec *in_vec, uint32_t num_invec,
48 psa_outvec *out_vec, uint32_t num_outvec);
49
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif /* __ATTESTATION_H__ */