]>
Commit | Line | Data |
---|---|---|
f33fa229 AM |
1 | diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py |
2 | index 997eec08..06c763db 100644 | |
3 | --- a/pylib/gyp/generator/make.py | |
4 | +++ b/pylib/gyp/generator/make.py | |
5 | @@ -1774,7 +1774,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD | |
6 | ||
7 | # Hash the target name to avoid generating overlong filenames. | |
8 | cmdstring = (command if command else self.target).encode('utf-8') | |
9 | - cmddigest = hashlib.sha1(cmdstring).hexdigest() | |
10 | + cmddigest = hashlib.sha1(cmdstring, usedforsecurity=False).hexdigest() | |
11 | intermediate = "%s.intermediate" % (cmddigest) | |
12 | self.WriteLn('%s: %s' % (' '.join(outputs), intermediate)) | |
13 | self.WriteLn('\t%s' % '@:'); | |
14 | diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py | |
15 | index bf04e567..631ef7f2 100644 | |
16 | --- a/pylib/gyp/generator/ninja.py | |
17 | +++ b/pylib/gyp/generator/ninja.py | |
18 | @@ -751,7 +751,7 @@ class NinjaWriter(object): | |
19 | if self.flavor == 'win': | |
20 | # WriteNewNinjaRule uses unique_name for creating an rsp file on win. | |
21 | extra_bindings.append(('unique_name', | |
22 | - hashlib.md5(outputs[0]).hexdigest())) | |
23 | + hashlib.md5(outputs[0], usedforsecurity=False).hexdigest())) | |
24 | ||
25 | self.ninja.build(outputs, rule_name, self.GypPathToNinja(source), | |
26 | implicit=inputs, | |
27 | @@ -2388,7 +2388,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, | |
28 | qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name, | |
29 | toolset) | |
30 | qualified_target_for_hash = qualified_target_for_hash.encode('utf-8') | |
31 | - hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest() | |
32 | + hash_for_rules = hashlib.md5(qualified_target_for_hash, usedforsecurity=False).hexdigest() | |
33 | ||
34 | base_path = os.path.dirname(build_file) | |
35 | obj = 'obj' |