Thomas Bechtold eec02fdcab Allow MD5 checksums on FIPS-enabled systems
MD5 is used for upload and download checksums, to compare object
content against its ETag, and to skip uploads of unchanged files. On a
FIPS-enabled system hashlib refuses MD5 unless the caller marks it as
not used for security, so these operations fail with "unsupported hash
algorithm" errors.

Add an md5() helper to swiftclient.utils that passes usedforsecurity
through (dropping it on python < 3.9, which lacks the keyword) and use
it with usedforsecurity=False everywhere swiftclient hashes content.
Swift itself already does this, through swift.common.utils.md5().

The unit tests compute expected checksums with MD5 as well, so give
them an md5() helper that sets usedforsecurity=False; otherwise they
fail on a FIPS-enabled node.

Assisted-By: Claude Opus 5.5
Change-Id: I5f6cd6c41e85dcb9bdb1251b2600223ee76839d8
Signed-off-by: Thomas Bechtold <thomasbechtold@jpberlin.de>
2026-10-14 09:39:22 +02:00
2026-02-23 15:21:27 -08:00
2022-01-12 10:19:50 +01:00
2018-07-13 11:24:24 -07:00
2018-11-05 09:52:03 +07:00
2019-04-19 19:32:30 +00:00
2024-02-27 09:14:44 -08:00
2026-02-24 16:29:29 -08:00
2026-02-25 09:31:01 -08:00
2012-05-08 16:30:13 +01:00
2013-05-01 12:23:12 -04:00
2026-07-31 17:58:16 +09:00
2025-04-25 15:51:12 -07:00
2022-03-21 18:31:10 +00:00
2022-03-16 15:06:19 -07:00
2022-03-16 15:06:19 -07:00

Python bindings to the OpenStack Object Storage API

Latest Version

This is a python client for the Swift API. There's a Python API (the swiftclient module), and a command-line script (swift).

Development takes place via the usual OpenStack processes as outlined in the OpenStack wiki.

This code is based on the original client previously included with OpenStack's Swift. The python-swiftclient is licensed under the Apache License like the rest of OpenStack.

Contents:

S
Description
OpenStack Storage (Swift) Client
Readme
15 MiB
2 Watchers 0 Forks
Languages
Python 99.9%
Shell 0.1%