[GSC] Refactor GSC and make it work again

Commit "Introduce one, central manifest, zero-config children and
constant MRENCLAVE" broke GSC. This commit fixes GSC (mainly adjusts
it the single-manifest change in that commit). Also, significant
internal refactoring is done (no user-visible changes). Also, scripts
now explicitly use UTF-8 when reading/writing the manifest files because
they are written in TOML which forces UTF-8.
This commit is contained in:
Dmitrii Kuvaiskii
2021-01-21 02:33:38 -08:00
parent e0f6ac9116
commit 0a4d5ce0e5
21 changed files with 392 additions and 519 deletions
+3 -3
View File
@@ -65,7 +65,7 @@ def parse_size(value):
def read_manifest(filename):
manifest = dict()
manifest_layout = []
with open(filename, 'r') as file:
with open(filename, 'r', encoding='UTF-8') as file:
for line in file:
if line == '':
manifest_layout.append((None, None))
@@ -107,7 +107,7 @@ def exec_sig_manifest(args):
def output_manifest(filename, manifest, manifest_layout):
with open(filename, 'w') as file:
with open(filename, 'w', encoding='UTF-8') as file:
written = []
file.write('# DO NOT MODIFY. THIS FILE WAS AUTO-GENERATED.\n\n')
@@ -831,7 +831,7 @@ def make_depend(args):
dependencies.add(args['libpal'])
dependencies.add(args['key'])
with open(output, 'w') as file:
with open(output, 'w', encoding='UTF-8') as file:
manifest_sgx = output
if manifest_sgx.endswith('.d'):
manifest_sgx = manifest_sgx[:-len('.d')]