From e6c4519e9caae8569fe0c124f3f91faf579e850d Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Sat, 23 Dec 2023 11:42:58 +0900 Subject: [PATCH] evaluate validation context in `aggregate_messages` Signed-off-by: Jun Kimura --- .../ecall-handler/src/light_client/aggregate_messages.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/enclave-modules/ecall-handler/src/light_client/aggregate_messages.rs b/enclave-modules/ecall-handler/src/light_client/aggregate_messages.rs index b57eb2c7..3dd6016f 100644 --- a/enclave-modules/ecall-handler/src/light_client/aggregate_messages.rs +++ b/enclave-modules/ecall-handler/src/light_client/aggregate_messages.rs @@ -5,7 +5,7 @@ use crypto::{EnclavePublicKey, Signer, Verifier}; use ecall_commands::{AggregateMessagesInput, AggregateMessagesResult, LightClientResult}; use light_client::{ commitments::{self, prove_commitment, Message, UpdateClientMessage}, - LightClientResolver, + HostContext, LightClientResolver, }; use store::KVStore; @@ -38,6 +38,7 @@ pub fn aggregate_messages( .zip(input.signatures.iter()) .map(|(c, s)| -> Result<_, Error> { verify_commitment(&pk, &c, s)?; + c.context.validate(ctx.host_timestamp())?; Ok(c) }) .collect::, _>>()?;