diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-08-15 15:37:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 15:37:51 (GMT) |
commit | 3fa97b8589c551e70ec935e7f39d56c3c5d5ed7e (patch) | |
tree | 7af644b84027bc7ceac1b93e4ff91dfecba5d280 /Lib/asyncio/taskgroups.py | |
parent | 3ce1d0093e61605209ed7ce93b541eb42aea6ffc (diff) | |
download | cpython-3fa97b8589c551e70ec935e7f39d56c3c5d5ed7e.zip cpython-3fa97b8589c551e70ec935e7f39d56c3c5d5ed7e.tar.gz cpython-3fa97b8589c551e70ec935e7f39d56c3c5d5ed7e.tar.bz2 |
gh-95231: Disable md5 & crypt modules if FIPS is enabled (GH-94742)
If kernel fips is enabled, we get permission error upon doing
`import crypt`. 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 "<stdin>", line 1, in <module>
File "/usr/lib/python3.9/crypt.py", line 117, in <module>
_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
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
(cherry picked from commit 2fa03b1b0708d5d74630c351ec9abd2aac7550da)
Co-authored-by: Shreenidhi Shedi <53473811+sshedi@users.noreply.github.com>
Diffstat (limited to 'Lib/asyncio/taskgroups.py')
0 files changed, 0 insertions, 0 deletions