Skip to content

Conversation

@mmarchetti
Copy link
Contributor

Description

We compute file and buffer checksums to support a file upload integrity check, using hashlib.md5 which is in the Python standard library. It's possible to have a python installation where this function is not available or requires special handling; this is related to building openssl in FIPS mode. This PR enables a fallback mode if hashlib.md5 is not available, by trying md5 with the usedforsecurity option set to False (this is new in Python 3.9).

Connected to #174

Testing Notes / Validation Steps

Test deploying content, on a normal python installation and one which is configured for FIPS (where hashlib.md5 requires the usedforsecurity parameter to be False in order to function).

@mmarchetti mmarchetti requested review from bcwu and toph-allen April 14, 2021 14:52
@mmarchetti mmarchetti merged commit 86d7e8e into master Apr 14, 2021
@mmarchetti mmarchetti deleted the mm-md5-fips branch April 14, 2021 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants