mirror of
https://github.com/python/cpython.git
synced 2025-08-14 22:01:08 +00:00
[3.9] bpo-40479: Fix hashlib's usedforsecurity for OpenSSL 3.0.0 (GH-30455) (GH-30574)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
d9101c4e49
commit
4ddd5da269
9 changed files with 375 additions and 237 deletions
|
@ -385,7 +385,7 @@ class NewIMAPTestsMixin():
|
|||
self.assertEqual(code, 'OK')
|
||||
self.assertEqual(server.response, b'ZmFrZQ==\r\n') # b64 encoded 'fake'
|
||||
|
||||
@hashlib_helper.requires_hashdigest('md5')
|
||||
@hashlib_helper.requires_hashdigest('md5', openssl=True)
|
||||
def test_login_cram_md5_bytes(self):
|
||||
class AuthHandler(SimpleIMAPHandler):
|
||||
capabilities = 'LOGINDISABLED AUTH=CRAM-MD5'
|
||||
|
@ -403,7 +403,7 @@ class NewIMAPTestsMixin():
|
|||
ret, _ = client.login_cram_md5("tim", b"tanstaaftanstaaf")
|
||||
self.assertEqual(ret, "OK")
|
||||
|
||||
@hashlib_helper.requires_hashdigest('md5')
|
||||
@hashlib_helper.requires_hashdigest('md5', openssl=True)
|
||||
def test_login_cram_md5_plain_text(self):
|
||||
class AuthHandler(SimpleIMAPHandler):
|
||||
capabilities = 'LOGINDISABLED AUTH=CRAM-MD5'
|
||||
|
@ -849,7 +849,7 @@ class ThreadedNetworkedTests(unittest.TestCase):
|
|||
b'ZmFrZQ==\r\n') # b64 encoded 'fake'
|
||||
|
||||
@reap_threads
|
||||
@hashlib_helper.requires_hashdigest('md5')
|
||||
@hashlib_helper.requires_hashdigest('md5', openssl=True)
|
||||
def test_login_cram_md5(self):
|
||||
|
||||
class AuthHandler(SimpleIMAPHandler):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue