Tamas Ban | 48a0eb5 | 2018-08-17 12:48:05 +0100 | [diff] [blame] | 1 | /* |
Tamas Ban | 2318feb | 2019-01-02 16:50:51 +0000 | [diff] [blame] | 2 | * Copyright (c) 2018-2019, Arm Limited. All rights reserved. |
Tamas Ban | 48a0eb5 | 2018-08-17 12:48:05 +0100 | [diff] [blame] | 3 | * |
| 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 |
| 15 | extern "C" { |
| 16 | #endif |
| 17 | |
Tamas Ban | 48a0eb5 | 2018-08-17 12:48:05 +0100 | [diff] [blame] | 18 | /*! |
| 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 | */ |
| 25 | enum 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 | */ |
| 39 | enum psa_attest_err_t |
| 40 | initial_attest_get_token(const psa_invec *in_vec, uint32_t num_invec, |
| 41 | psa_outvec *out_vec, uint32_t num_outvec); |
| 42 | |
Tamas Ban | b6b8056 | 2019-01-04 22:49:24 +0000 | [diff] [blame] | 43 | /** |
| 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 | */ |
| 55 | enum psa_attest_err_t |
| 56 | initial_attest_get_token_size(const psa_invec *in_vec, uint32_t num_invec, |
| 57 | psa_outvec *out_vec, uint32_t num_outvec); |
Tamas Ban | 48a0eb5 | 2018-08-17 12:48:05 +0100 | [diff] [blame] | 58 | #ifdef __cplusplus |
| 59 | } |
| 60 | #endif |
| 61 | |
| 62 | #endif /* __ATTESTATION_H__ */ |