mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
bpo-9216: hashlib usedforsecurity fixes (GH-20258)
func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
``_hashlib.new()``. test_hashlib and test_smtplib handle strict security
policy better.
Signed-off-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: @tiran
(cherry picked from commit 909b5714e1
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
983b17ca13
commit
a08b7c3bb0
6 changed files with 90 additions and 34 deletions
|
@ -3,12 +3,14 @@
|
|||
import os
|
||||
import unittest
|
||||
from test import support
|
||||
from test.support import hashlib_helper
|
||||
from test.support.script_helper import assert_python_ok, assert_python_failure
|
||||
|
||||
from test.test_tools import scriptsdir, skip_if_missing
|
||||
|
||||
skip_if_missing()
|
||||
|
||||
@hashlib_helper.requires_hashdigest('md5')
|
||||
class MD5SumTests(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue