bpo-40479: Fix hashlib's usedforsecurity for OpenSSL 3.0.0 (GH-30455)

This commit is contained in:
Christian Heimes 2022-01-13 10:46:38 +02:00 committed by GitHub
parent a6ca8eee22
commit 443b308fee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 359 additions and 250 deletions

View file

@ -1171,7 +1171,7 @@ class SMTPSimTests(unittest.TestCase):
finally:
smtp.close()
@hashlib_helper.requires_hashdigest('md5')
@hashlib_helper.requires_hashdigest('md5', openssl=True)
def testAUTH_CRAM_MD5(self):
self.serv.add_feature("AUTH CRAM-MD5")
smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost',
@ -1180,7 +1180,7 @@ class SMTPSimTests(unittest.TestCase):
self.assertEqual(resp, (235, b'Authentication Succeeded'))
smtp.close()
@hashlib_helper.requires_hashdigest('md5')
@hashlib_helper.requires_hashdigest('md5', openssl=True)
def testAUTH_multiple(self):
# Test that multiple authentication methods are tried.
self.serv.add_feature("AUTH BOGUS PLAIN LOGIN CRAM-MD5")