oslo.versionedobjects/oslo_versionedobjects
Ade Lee 9f0f31eb8b Replace md5 with oslo version
md5 is not an approved algorithm in FIPS mode, and trying to
instantiate a hashlib.md5() will fail when the system is running in
FIPS mode.

md5 is allowed when in a non-security context.  There is a plan to
add a keyword parameter (usedforsecurity) to hashlib.md5() to annotate
whether or not the instance is being used in a security context.

In the case where it is not, the instantiation of md5 will be allowed.
See https://bugs.python.org/issue9216 for more details.

Some downstream python versions already support this parameter.  To
support these versions, a new encapsulation of md5() has been added to
oslo_utils.  See https://review.opendev.org/#/c/750031/

This patch is to replace the instances of hashlib.md5() with this new
encapsulation, adding an annotation indicating whether the usage is
a security context or not.

In this case, md5 is computed as one of the object hashes for the
purposes of object versioning.

Change-Id: Idf36897d690a20d23123950618643d0b9e085f6c
Depends-On: https://review.opendev.org/#/c/760160
2020-10-29 13:30:07 -04:00
..
examples Bump to hacking 2.x 2020-02-07 10:35:08 -08:00
locale/en_GB/LC_MESSAGES Imported Translations from Zanata 2020-05-22 09:23:21 +00:00
tests Merge "[goal] Migrate testing to ubuntu focal" 2020-09-11 01:42:51 +00:00
__init__.py Update to the latest version of hacking 2015-04-03 14:08:13 +00:00
_i18n.py Remove log translations 2017-12-29 11:31:37 -06:00
_options.py make configuration options discoverable 2015-09-24 20:07:03 +00:00
_utils.py Handle TZ change in iso8601 >=0.1.12 2018-01-24 03:00:51 +00:00
base.py Merge "Handle unregistered nested objects" 2020-03-07 20:58:38 +00:00
exception.py Merge "Handle unregistered nested objects" 2020-03-07 20:58:38 +00:00
fields.py Bump to hacking 2.x 2020-02-07 10:35:08 -08:00
fixture.py Replace md5 with oslo version 2020-10-29 13:30:07 -04:00
test.py Update hacking for Python3 2020-05-16 19:29:41 +02:00