Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use != 0 rather than == 1 and update a comment.
  • Loading branch information
gpshead authored and xnox committed Sep 8, 2025
commit 42b912a0477c721969261ce9c5e99ac4ab3988b9
2 changes: 1 addition & 1 deletion Lib/hashlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __usedforsecurity_check(md, name, *args, **kwargs):
# implementations are treated as an unapproved implementation, as they
# are unlikely to have been certified by NIST.
def __get_wrapped_builtin(md, name):
if _hashlib is not None and _hashlib.get_fips_mode() == 1:
if _hashlib is not None and _hashlib.get_fips_mode() != 0:
from functools import partial
return partial(__usedforsecurity_check, md, name)
return md
Expand Down