[node-patches] Change in ovirt-node[master]: Use sha1 if md5 isn't available
Ryan Harper
ryanh at us.ibm.com
Tue Apr 9 16:05:08 UTC 2013
Ryan Harper has uploaded a new change for review.
Change subject: Use sha1 if md5 isn't available
......................................................................
Use sha1 if md5 isn't available
With fips=1 enabled, the md5 hash is disabled, use sha1 instead.
Change-Id: I75507f20cb48f98ac5bf4f82f34bbf45922c6640
Signed-off-by: Ryan Harper <ryanh at us.ibm.com>
---
M scripts/ovirtnode/ovirtfunctions.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/59/13759/1
diff --git a/scripts/ovirtnode/ovirtfunctions.py b/scripts/ovirtnode/ovirtfunctions.py
index 88876cd..04a3570 100644
--- a/scripts/ovirtnode/ovirtfunctions.py
+++ b/scripts/ovirtnode/ovirtfunctions.py
@@ -720,7 +720,11 @@
return False
def cksum(filename):
- m = hashlib.md5()
+ try:
+ m = hashlib.md5()
+ except:
+ m = hashlib.sha1()
+
with open(filename) as f:
data = f.read(4096)
while data:
--
To view, visit http://gerrit.ovirt.org/13759
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I75507f20cb48f98ac5bf4f82f34bbf45922c6640
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <ryanh at us.ibm.com>
More information about the node-patches
mailing list