Julian Hall | 700aa36 | 2021-05-13 15:30:39 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef PSA_IAT_CLIENT_H |
| 8 | #define PSA_IAT_CLIENT_H |
| 9 | |
| 10 | #include <psa/error.h> |
| 11 | #include <rpc_caller.h> |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | |
| 17 | /** |
| 18 | * @brief Initialises the singleton IAT client |
| 19 | * |
| 20 | * The IAT client provides an implementation of the PSA Attestation API. |
| 21 | * This API may be used by client applications to request attestion |
| 22 | * tokens. |
| 23 | * |
| 24 | * @param[in] rpc_caller RPC caller instance |
| 25 | * |
| 26 | * @return A status indicating the success/failure of the operation |
| 27 | */ |
| 28 | psa_status_t psa_iat_client_init(struct rpc_caller *caller); |
| 29 | |
| 30 | /** |
| 31 | * @brief De-initialises the singleton IAT client |
| 32 | * |
| 33 | */ |
| 34 | void psa_iat_client_deinit(void); |
| 35 | |
| 36 | /** |
| 37 | * @brief Return the most recent RPC status |
| 38 | * |
| 39 | * May be used to obtain information about an RPC error that resulted |
| 40 | * in an API operation failure |
| 41 | * |
| 42 | * @return Most recent RPC operation status |
| 43 | */ |
| 44 | int psa_iat_client_rpc_status(void); |
| 45 | |
| 46 | |
| 47 | #ifdef __cplusplus |
| 48 | } |
| 49 | #endif |
| 50 | |
| 51 | #endif /* PSA_IAT_CLIENT_H */ |