Skip to content

hashlib.md5 doesn't work when FIPS is enabled #414

@dantebben

Description

@dantebben

Python Version

3.9.9

pytest Version

6.2.5

Package Version

3.10.2

Description

On a system where FIPS is enabled, pytest-randomly fails on line 275

hasher = hashlib.md5()

with the following error

ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS

This appears to be common among tools that use hashlib. The following workaround seems to fix the problem, edit pytest_randomly/__init__.py line 275 to be:

hasher = hashlib.md5(usedforsecurity=False)

I found this idea for a fix here: s3tools/s3cmd#1005 (comment). This issue was related to another package using hashlib.md5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions