Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If on Python 3.9+, set usedforsecurity parameter to False #426

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

PabloAlexis611
Copy link
Contributor

This is a small, backwards compatible change that allows the use of rinohtype in FIPS-enabled environments that raise errors when using the MD5 hashlib function. Since the purpose of using MD5 in this context is not security-related, this change is acceptable. The usedforsecurity parameter was added starting in Python 3.9+ for the md5 function of the hashlib library.

An error like the following is otherwise thrown:

digital envelope routines:EVP_DigestInit_ex:disabled for fips

An alternative could also be to call the SHA256 hashing function instead, but making this change keeps the current behavior of the rinohtype package.

@CLAassistant
Copy link

CLAassistant commented Mar 7, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.23%. Comparing base (26635ef) to head (ce17498).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #426   +/-   ##
=======================================
  Coverage   77.23%   77.23%           
=======================================
  Files          93       93           
  Lines       14690    14690           
  Branches     2416     2416           
=======================================
  Hits        11346    11346           
  Misses       2906     2906           
  Partials      438      438           
Flag Coverage Δ
3.10 77.24% <100.00%> (ø)
3.11 77.25% <100.00%> (ø)
3.12.0-alpha 77.25% <100.00%> (ø)
3.8 77.20% <100.00%> (ø)
3.9 46.88% <50.00%> (ø)
Linux 77.22% <100.00%> (ø)
pypy-3.9 77.23% <100.00%> (ø)
regression-3.10 75.75% <100.00%> (ø)
regression-3.11 75.76% <100.00%> (ø)
regression-3.12 75.76% <100.00%> (ø)
regression-3.8 75.70% <100.00%> (ø)
regression-pypy3 75.74% <100.00%> (ø)
unit-3.10 46.89% <50.00%> (ø)
unit-3.11 46.89% <50.00%> (ø)
unit-3.12 46.89% <50.00%> (ø)
unit-3.8 46.88% <50.00%> (ø)
unit-3.9 46.88% <50.00%> (ø)
unit-pypy3 46.90% <50.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brechtm brechtm merged commit 9002087 into brechtm:master Mar 24, 2024
39 of 40 checks passed
@brechtm
Copy link
Owner

brechtm commented Mar 24, 2024

Thanks @PabloAlexis611!

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.

None yet

3 participants