Skip to content

Conversation

@tommycbird
Copy link
Contributor

@tommycbird tommycbird commented Aug 26, 2025

Description

Resolves Issue: #223 (comment)

When running under a FIPS-enabled OpenSSL build, Checksums.generate raises the following:

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

You would think that by marking deploy with checksum_enabled=False it would circumvent this, but even though it does not use the checksum in this scenario, it still makes a call to Checksums.generate which is redundant and makes it impossible to avoid this specific problem.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has it been tested ?

  • Ran full pytest suite locally (via poetry environment) → no new failures, no decrease in coverage
  • Ran deploy with checksum_enabled=True (verified expected behavior)
  • Ran deploy with checksum_enabled=False (FIPS error gone)

Checklist:

  • My PR is ready for prime time!
  • All commits have a correct title
  • Readme has been updated
  • Quality tests are green (see Codacy)
  • Automated tests are green (see pipeline)

@anancarv
Copy link
Owner

anancarv commented Sep 5, 2025

Hey @tommycbird ,
Thanks for raising. I believe merging your changes will bring back this old issue #199 . Is it possible that the issue comes from your artifact (corrupted ...)?

@tommycbird
Copy link
Contributor Author

Hey @anancarv sorry for the late reply. Yes not adding checksums at all will cause a warning on Artifactory, which is annoying.

I would suggest then to make this update be a modification to the hashlib calls. If called with usedforsecurity=False then the FIPS issue won't come up. I've tested this change on my end. Do you foresee that change causing any issues? If not then I can update my PR.

@anancarv
Copy link
Owner

Hey @anancarv sorry for the late reply. Yes not adding checksums at all will cause a warning on Artifactory, which is annoying.

I would suggest then to make this update be a modification to the hashlib calls. If called with usedforsecurity=False then the FIPS issue won't come up. I've tested this change on my end. Do you foresee that change causing any issues? If not then I can update my PR.

Hey @tommycbird ,
This is a good solution. It is safe to call haslib with usedforsecurity=False in this context since checksums are used here to detect accidental errors or data corruption, not cryptographic security. You can update the MR

@anancarv
Copy link
Owner

anancarv commented Sep 10, 2025

Also, the lint job is failing on the bandit step. Can you please rebase with master so that the fix can be applied to your branch?

@tommycbird tommycbird force-pushed the fix/deploy-checksum-flag branch from 1c4a313 to ac23195 Compare September 10, 2025 21:17
@tommycbird
Copy link
Contributor Author

Rebased with upstream/master, removed the old changes, and added in usedforsecurity=False into the function mapping.

@tommycbird
Copy link
Contributor Author

Tests added and passing. Put it in a try catch, and made it call the get_hash from where hasher = is declared.

@tommycbird tommycbird requested a review from anancarv September 11, 2025 15:52
Copy link
Owner

@anancarv anancarv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Good work 😃

@anancarv anancarv merged commit eaeec27 into anancarv:master Sep 11, 2025
2 of 7 checks passed
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.

2 participants