mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
bpo-38270: Check for hash digest algorithms and avoid MD5 (GH-16382)
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
This commit is contained in:
parent
417089e88b
commit
c64a1a61e6
8 changed files with 119 additions and 45 deletions
|
@ -322,6 +322,7 @@ class ProxyAuthTests(unittest.TestCase):
|
|||
PASSWD = "test123"
|
||||
REALM = "TestRealm"
|
||||
|
||||
@support.requires_hashdigest("md5")
|
||||
def setUp(self):
|
||||
super(ProxyAuthTests, self).setUp()
|
||||
# Ignore proxy bypass settings in the environment.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue