summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/sgx/sigstruct.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/sgx/sigstruct.c')
-rw-r--r--tools/testing/selftests/sgx/sigstruct.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
index 202a96fd81bf..50c5ab1aa6fa 100644
--- a/tools/testing/selftests/sgx/sigstruct.c
+++ b/tools/testing/selftests/sgx/sigstruct.c
@@ -296,8 +296,10 @@ static bool mrenclave_segment(EVP_MD_CTX *ctx, struct encl *encl,
if (!mrenclave_eadd(ctx, seg->offset + offset, seg->flags))
return false;
- if (!mrenclave_eextend(ctx, seg->offset + offset, seg->src + offset))
- return false;
+ if (seg->measure) {
+ if (!mrenclave_eextend(ctx, seg->offset + offset, seg->src + offset))
+ return false;
+ }
}
return true;