Skip to content

Remove MD5 use to allow FIPS compliance. #3165

Description

@RayGozer

Short Description

Systems with FIPS enabled cannot run scancode-toolkit due to use of MD5 algorithm. Causes error: "ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS".

Possible Labels

  • new feature

Select Category

  • Enhancement

Describe the Update

Certain systems are required to enabled FIPS due to contractual requirements. With FIPS enabled, any use of MD5 results in an error when using scancode-toolkit.

File "venv/lib/python3.8/site-packages/licensedcode/match_hash.py", line 49, in tokens_hash
return md5(as_bytes).digest()
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS

MD5 can be replaced with SHA1, which is FIPS compliant.

How This Feature will help you/your organization

We cannot use scancode-toolkit without this modification.

Possible Solution/Implementation Details

Assuming the use of MD5 is arbitrary, it may be possible to replace it with SHA1.

Example/Links if Any

I have no public links available.

Can you help with this Feature

Maybe. I am waiting for authorization to submit a pull request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions