Soby Mathew | 294e1cf | 2022-03-22 16:19:39 +0000 | [diff] [blame] | 1 | /* |
Manish V Badarkhe | 37f9ac2 | 2023-03-12 21:34:44 +0000 | [diff] [blame] | 2 | * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved. |
Soby Mathew | 294e1cf | 2022-03-22 16:19:39 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Manish V Badarkhe | 37f9ac2 | 2023-03-12 21:34:44 +0000 | [diff] [blame] | 7 | #include <delegated_attestation.h> |
| 8 | #include <psa/error.h> |
Soby Mathew | 294e1cf | 2022-03-22 16:19:39 +0000 | [diff] [blame] | 9 | |
Manish V Badarkhe | 37f9ac2 | 2023-03-12 21:34:44 +0000 | [diff] [blame] | 10 | /* |
| 11 | * Get the platform attestation token through the PSA delegated attestation |
| 12 | * layer. |
| 13 | * |
| 14 | * FVP cannot support RSS hardware at the moment, but it can still mock the |
| 15 | * RSS implementation of the PSA interface (see PLAT_RSS_NOT_SUPPORTED). |
| 16 | */ |
Javier Almansa Sobrino | 7176a77 | 2021-11-24 18:37:37 +0000 | [diff] [blame] | 17 | int plat_rmmd_get_cca_attest_token(uintptr_t buf, size_t *len, |
| 18 | uintptr_t hash, size_t hash_size) |
Soby Mathew | 294e1cf | 2022-03-22 16:19:39 +0000 | [diff] [blame] | 19 | { |
Manish V Badarkhe | 37f9ac2 | 2023-03-12 21:34:44 +0000 | [diff] [blame] | 20 | psa_status_t ret; |
Soby Mathew | 294e1cf | 2022-03-22 16:19:39 +0000 | [diff] [blame] | 21 | |
Manish V Badarkhe | 37f9ac2 | 2023-03-12 21:34:44 +0000 | [diff] [blame] | 22 | ret = rss_delegated_attest_get_token((const uint8_t *)hash, hash_size, |
| 23 | (uint8_t *)buf, *len, len); |
Soby Mathew | 294e1cf | 2022-03-22 16:19:39 +0000 | [diff] [blame] | 24 | |
Manish V Badarkhe | 37f9ac2 | 2023-03-12 21:34:44 +0000 | [diff] [blame] | 25 | return ret; |
Soby Mathew | 294e1cf | 2022-03-22 16:19:39 +0000 | [diff] [blame] | 26 | } |