Mbed OS Reference
Loading...
Searching...
No Matches
tfm_attest_hal.h
1/*
2 * Copyright (c) 2019, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __TFM_ATTEST_HAL_H__
9#define __TFM_ATTEST_HAL_H__
10
11#include <stdint.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/**
18 * \brief Security lifecycle of the device
19 */
20enum tfm_security_lifecycle_t {
21 TFM_SLC_UNKNOWN = 0x0000u,
22 TFM_SLC_ASSEMBLY_AND_TEST = 0x1000u,
23 TFM_SLC_PSA_ROT_PROVISIONING = 0x2000u,
24 TFM_SLC_SECURED = 0x3000u,
25 TFM_SLC_NON_PSA_ROT_DEBUG = 0x4000u,
26 TFM_SLC_RECOVERABLE_PSA_ROT_DEBUG = 0x5000u,
27 TFM_SLC_DECOMMISSIONED = 0x6000u,
28};
29
30/**
31 * \brief Retrieve the security lifecycle of the device
32 *
33 * Security lifecycle is a mandatory claim in the initial attestation token.
34 *
35 * \return According to \ref tfm_security_lifecycle_t
36 */
37enum tfm_security_lifecycle_t tfm_attest_hal_get_security_lifecycle(void);
38
39/**
40 * \brief Retrieve the verification service indicator for initial attestation.
41 *
42 * It is used by relying party to locate a validation service for the token.
43 * It can be a text string that can be used to locate the service or can be a
44 * URL specifying the address of the service.
45 *
46 * \param[out] size Length of the string, without the termination zero byte.
47 *
48 * \return NULL pointer if not available otherwise the address of the
49 * verification service string in the device memory.
50 */
51const char *
52tfm_attest_hal_get_verification_service(uint32_t *size);
53
54/**
55 * \brief Retrieve the name of the profile definition document for initial
56 * attestation.
57 *
58 * This document describes the 'profile' of the initial attestation token,
59 * being a full description of the claims, their usage, verification and
60 * token signing.
61 *
62 * \param[out] size Length of the document name, without the termination zero
63 * byte.
64 *
65 * \return NULL pointer if not available otherwise the address of the document
66 * name string in the device memory.
67 */
68const char *
69tfm_attest_hal_get_profile_definition(uint32_t *size);
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* __TFM_ATTEST_HAL_H__ */