Browse Source

[Pal/Linux-SGX] Fix checking of the size of a signature file

The format of enclave signature should strictly match the spec.
Jia Zhang 4 years ago
parent
commit
1bb5047403
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Pal/src/host/Linux-SGX/sgx_framework.c

+ 1 - 1
Pal/src/host/Linux-SGX/sgx_framework.c

@@ -70,7 +70,7 @@ int read_enclave_sigstruct(int sigfile, sgx_arch_sigstruct_t * sig)
     if (IS_ERR(ret))
         return -ERRNO(ret);
 
-    if ((size_t)stat.st_size < sizeof(sgx_arch_sigstruct_t)) {
+    if ((size_t)stat.st_size != sizeof(sgx_arch_sigstruct_t)) {
         SGX_DBG(DBG_I, "size of sigstruct size does not match\n");
         return -EINVAL;
     }