]> granicus.if.org Git - python/commit
[3.8] bpo-38270: Check for hash digest algorithms and avoid MD5 (GH-16382) (GH-16393)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 25 Sep 2019 15:50:31 +0000 (08:50 -0700)
committerGitHub <noreply@github.com>
Wed, 25 Sep 2019 15:50:31 +0000 (08:50 -0700)
commit66cd041df8dfadd001ae298292e16f0271c0d139
tree2e40b51304e31b00452937bee5660d9c56b78a39
parent7444a5a402bbac4268b95958a9578a9e3dae33e0
[3.8] bpo-38270: Check for hash digest algorithms and avoid MD5 (GH-16382) (GH-16393)

Make it easier to run and test Python on systems with restrict crypto policies:

* add requires_hashdigest to test.support to check if a hash digest algorithm is available and working
* avoid MD5 in test_hmac
* replace MD5 with SHA256 in test_tarfile
* mark network tests that require MD5 for MD5-based digest auth or CRAM-MD5

https://bugs.python.org/issue38270
(cherry picked from commit c64a1a61e6fc542cada40eb069a239317e1af36e)

Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38270

Automerge-Triggered-By: @tiran
Lib/test/support/__init__.py
Lib/test/test_hmac.py
Lib/test/test_imaplib.py
Lib/test/test_poplib.py
Lib/test/test_smtplib.py
Lib/test/test_tarfile.py
Lib/test/test_urllib2_localnet.py
Misc/NEWS.d/next/Tests/2019-09-25-12-18-31.bpo-38270._x-9uH.rst [new file with mode: 0644]