Browse Source

[Pal/Linux-SGX] Signer should retrieve mrenclave from .sig

The current logic tries to retrieve mrenclave from target executable.
It should get it from .sig.

Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
Isaku Yamahata 5 years ago
parent
commit
c76ca7b7eb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Pal/src/host/Linux-SGX/signer/pal-sgx-sign

+ 2 - 0
Pal/src/host/Linux-SGX/signer/pal-sgx-sign

@@ -252,6 +252,8 @@ def get_trusted_children(manifest, args):
             raise Exception('repeated key in manifest: sgx.trusted_children.' + key)
 
         target = resolve_uri(val)
+        if not target.endswith('.sig'):
+            target += '.sig'
         sig = open(target, 'rb').read()[960:992].encode('hex')
         targets[key] = (val, target, sig)