Fix #292 Run in FIPS enabled environment with python3.10

Python 3.10 and later versions rely on OpenSSL 1.1.1 or newer, which includes FIPS-compliance checks.

MD5 is not an approved algorithm in FIPS mode, so attempting to instantiate hashlib.md5() will fail when the system is running in FIPS mode.
Since MD5 is used in a non-security context, the change adds the [_usedforsecurity_](https://docs.python.org/3/library/hashlib.html) flag.

The same issue in Django https://github.com/django/django/commit/d10c7bfe56f025ccc690721c9f13e7029b777b9c
This commit is contained in:
markesha authored and David Wobrock committed 2025-03-30 19:03:28 +02:00
1 parent eb59c472fb
commit dfd83cf9b8
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -8,6 +8,7 @@ Miscellaneous:
- Add support for Python 3.13
- Add support for Django 5.1
- Drop support for Python 3.7 and 3.8
- Mark md5 hashing as not used for security
## 5.1.0