New GitHub issue #95231 from sshedi:<br>

<hr>

<pre>
<!--
  If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not
  the right place to seek help. Consider the following options instead:

  - reading the Python tutorial: https://docs.python.org/3/tutorial/
  - posting in the "Users" category on discuss.python.org: https://discuss.python.org/c/users/7
  - emailing the Python-list mailing list: https://mail.python.org/mailman/listinfo/python-list
  - searching our issue tracker (https://github.com/python/cpython/issues) to see if
    your problem has already been reported
-->

# Bug report

If kernel fips is enabled, we get permission error upon doing `import crypto`.
So, if kernel fips is enabled, disable the unallowed hashing methods.
```
Python 3.9.1 (default, May 10 2022, 11:36:26)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

            import crypt
            Traceback (most recent call last):
            File "", line 1, in
            File "/usr/lib/python3.9/crypt.py", line 117, in
            _add_method('MD5', '1', 8, 34)
            File "/usr/lib/python3.9/crypt.py", line 94, in _add_method
            result = crypt('', salt)
            File "/usr/lib/python3.9/crypt.py", line 82, in crypt
            return _crypt.crypt(word, salt)
            PermissionError: [Errno 1] Operation not permitted
```

# Your environment
VMware Photon OS 4.0
x86_64 machine
Python-3.9.1
Kernel fips is enabled
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/95231">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>