I just migrated a customer install to 1.2.3 on Centos 7.5 and when trying 
to view diffs, I was seeing the following error:

ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled 
for fips

I ended up writing the following patch to resolve the issue:

--- ./web/api.py.orig   2018-10-18 07:52:24.205812859 -0700
+++ ./web/api.py        2018-10-27 17:18:17.864423747 -0700
@@ -21,2 +21,3 @@
 from datetime import datetime
+import hashlib
 from hashlib import md5
@@ -24,2 +25,3 @@
 import mimetypes
+import inspect
 import os
@@ -638,3 +640,10 @@
         if isinstance(extra, list):
-            m = md5()
+            try:
+              m = md5()
+            except ValueError as e:
+              if 'usedforsecurity' in inspect.getargspec(hashlib.new)[0]:
+                m = md5(usedforsecurity=False)
+              else:
+                raise e
+
             for elt in extra:


Changing the hash may be more desirable, but this was the Minimum Viable 
Product.

Has anyone else run into this? If so, how was it resolved?

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to