Blame SOURCES/Fix-pip-install-in-FIPS-mode.patch

684680
From 1dc2aa897ddda51503572f3f70a4818cf9a3884d Mon Sep 17 00:00:00 2001
684680
From: Tomas Orsava <torsava@redhat.com>
684680
Date: Fri, 17 Mar 2017 13:14:56 +0100
684680
Subject: [PATCH] Fix `pip install` in FIPS mode
684680
684680
Resolves: rhbz#1430763
684680
---
684680
 pip/utils/hashes.py | 5 ++++-
684680
 1 file changed, 4 insertions(+), 1 deletion(-)
684680
684680
diff --git a/pip/utils/hashes.py b/pip/utils/hashes.py
684680
index 9602970..c6d7524 100644
684680
--- a/pip/utils/hashes.py
684680
+++ b/pip/utils/hashes.py
684680
@@ -39,7 +39,10 @@ class Hashes(object):
684680
         gots = {}
684680
         for hash_name in iterkeys(self._allowed):
684680
             try:
684680
-                gots[hash_name] = hashlib.new(hash_name)
684680
+                if hash_name == 'md5':
684680
+                    gots[hash_name] = hashlib.new(hash_name, usedforsecurity=False)
684680
+                else:
684680
+                    gots[hash_name] = hashlib.new(hash_name)
684680
             except (ValueError, TypeError):
684680
                 raise InstallationError('Unknown hash name: %s' % hash_name)
684680
 
684680
-- 
684680
2.11.0
684680