aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Nasiadka <michal.nasiadka@nokia.com>2019-04-25 09:06:28 +0200
committerMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2019-06-18 08:21:34 +0000
commit0a2dc8aa1d267da3c1c2925b3f292bd96aa50edb (patch)
tree57dcef23960f571a6fa931222b67b39a3c9f0923
parentcbdce1eff79da7b62c4cbc16bea2b98226d01233 (diff)
downloadkolla-0a2dc8aa1d267da3c1c2925b3f292bd96aa50edb.tar.gz
kolla-0a2dc8aa1d267da3c1c2925b3f292bd96aa50edb.zip
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
-rw-r--r--docker/ceph/ceph-mon/fetch_ceph_keys.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/docker/ceph/ceph-mon/fetch_ceph_keys.py b/docker/ceph/ceph-mon/fetch_ceph_keys.py
index 3303bdf5c..f0f4a7154 100644
--- a/docker/ceph/ceph-mon/fetch_ceph_keys.py
+++ b/docker/ceph/ceph-mon/fetch_ceph_keys.py
@@ -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}