mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-30 15:49:34 +00:00
Merge "fix(qemu): update rmmd_attest_get_platform_token()" into integration
This commit is contained in:
commit
8c99b19e53
1 changed files with 8 additions and 5 deletions
|
@ -212,18 +212,21 @@ static const uint8_t sample_platform_token[] = {
|
||||||
* RSE.
|
* RSE.
|
||||||
*/
|
*/
|
||||||
int plat_rmmd_get_cca_attest_token(uintptr_t buf, size_t *len,
|
int plat_rmmd_get_cca_attest_token(uintptr_t buf, size_t *len,
|
||||||
uintptr_t hash, size_t hash_size)
|
uintptr_t hash, size_t hash_size,
|
||||||
|
size_t *remaining_len)
|
||||||
{
|
{
|
||||||
|
const size_t token_size = sizeof(sample_platform_token);
|
||||||
(void)hash;
|
(void)hash;
|
||||||
(void)hash_size;
|
(void)hash_size;
|
||||||
|
|
||||||
if (*len < sizeof(sample_platform_token)) {
|
/* Shouldn't happen because RMM uses the whole 4kB shared buffer */
|
||||||
|
if (*len < token_size) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)memcpy((void *)buf, (const void *)sample_platform_token,
|
memcpy((void *)buf, sample_platform_token, token_size);
|
||||||
sizeof(sample_platform_token));
|
*len = token_size;
|
||||||
*len = sizeof(sample_platform_token);
|
*remaining_len = 0;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue