Add sha256 in ceph fetch keys
fetch_ceph_keys.py is using insecure sha1 function, this patch adds
sha256 beside sha1 - in order to remove sha1 safely in U release.
Change-Id: I32ba1abd204c9dba4bbe3132b5650b0e391616af
Closes-Bug: #1826327
(cherry picked from commit 0a2dc8aa1d
)
This commit is contained in:
parent
e735b0985e
commit
ac8609c0f1
|
@ -49,8 +49,10 @@ def read_file(filename):
|
|||
with open(filename_path, 'rb') as f:
|
||||
raw_data = f.read()
|
||||
|
||||
# TODO(mnasiadka): Remove sha1 in U
|
||||
return {'content': base64.b64encode(zlib.compress(raw_data)),
|
||||
'sha1': hashlib.sha1(raw_data).hexdigest(),
|
||||
'sha256': hashlib.sha256(raw_data).hexdigest(),
|
||||
'filename': filename}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue