From 93aa9ad9297fae10893bcb62ce9a24a1f6c96d99 2017-07-12 03:33:01 From: Srinath Date: 2017-07-12 03:33:01 Subject: [PATCH] Make IPython work with OpenSSL in FIPS mode #10615 `md5` is not supported with OpenSSL in FIPS mode, hence moving `md5` to `sha1` --- diff --git a/IPython/core/compilerop.py b/IPython/core/compilerop.py index 723a6ab..e5f619c 100644 --- a/IPython/core/compilerop.py +++ b/IPython/core/compilerop.py @@ -55,7 +55,7 @@ def code_name(code, number=0): This now expects code to be unicode. """ - hash_digest = hashlib.md5(code.encode("utf-8")).hexdigest() + hash_digest = hashlib.sha1(code.encode("utf-8")).hexdigest() # Include the number and 12 characters of the hash in the name. It's # pretty much impossible that in a single session we'll have collisions # even with truncated hashes, and the full one makes tracebacks too long