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

TLDExtract is not compatible with FIPS-enabled crypto libraries #308

Closed
CharlesB2 opened this issue Oct 17, 2023 · 0 comments
Closed

TLDExtract is not compatible with FIPS-enabled crypto libraries #308

CharlesB2 opened this issue Oct 17, 2023 · 0 comments

Comments

@CharlesB2
Copy link
Contributor

Using FIPS-enabled libraries I get the following error on importing tldextract:

 File "/home/nonroot/.my-venv/lib/python3.10/site-packages/tldextract/__init__.py", line 4, in <module>
    from .tldextract import TLDExtract, extract
  File "/home/nonroot/.my-venv/lib/python3.10/site-packages/tldextract/tldextract.py", line 148, in <module>
    class TLDExtract:
  File "/home/nonroot/.my-venv/lib/python3.10/site-packages/tldextract/tldextract.py", line 154, in TLDExtract
    cache_dir: str | None = get_cache_dir(),
  File "/home/nonroot/.my-venv/lib/python3.10/site-packages/tldextract/cache.py", line 74, in get_cache_dir
    xdg_cache_home, "python-tldextract", get_pkg_unique_identifier()
  File "/home/nonroot/.my-venv/lib/python3.10/site-packages/tldextract/cache.py", line 42, in get_pkg_unique_identifier
    python_binary_path_short_hash = md5(sys.prefix.encode("utf-8")).hexdigest()[:6]
ValueError: [digital envelope routines] unsupported

See https://docs.python.org/3/library/hashlib.html non-cryptographic hash functions must use usedforsecurity=False

CharlesB2 added a commit to CharlesB2/tldextract that referenced this issue Oct 17, 2023
CharlesB2 added a commit to CharlesB2/tldextract that referenced this issue Oct 17, 2023
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

No branches or pull requests

1 participant