Add temporary link to patched paramiko
paramiko has some calls to md5() which will break under fips.
We're going to have to replace paramiko eventually because it won't
be FIPS compliant, but until then we might be able to achieve
compatibility by patching paramiko.
@@ -39,6 +39,7 @@ from oslo_log import log
from oslo_utils import encodeutils
from oslo_utils import importutils
from oslo_utils import netutils
+from oslo_utils.secretutils import md5
from oslo_utils import strutils
from oslo_utils import timeutils
import paramiko
@@ -63,6 +64,21 @@ _ISO8601_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S'
synchronized = lockutils.synchronized_with_prefix('manila-')
+def get_fingerprint(self):
+ """Patch paramiko
+
+ This method needs to be patched to allow paramiko to work under FIPS.
+ Until the patch to do this merges, patch paramiko here.
+
+ TODO(carloss) Remove this when paramiko is patched.
+ See https://github.com/paramiko/paramiko/pull/1928
+ """
+ return md5(self.asbytes(), usedforsecurity=False).digest()
+
+
+paramiko.pkey.PKey.get_fingerprint = get_fingerprint
+
+
def isotime(at=None, subsecond=False):
"""Stringify time in ISO 8601 format."""
