bpo-34399: 2048 bits RSA keys and DH params by tiran · Pull Request #8762 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Lib/test/dh1024.pem

This file was deleted.

41 changes: 41 additions & 0 deletions Lib/test/ffdh3072.pem
10 changes: 5 additions & 5 deletions Lib/test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def data_file(*name):
BYTES_CAPATH = os.fsencode(CAPATH)
CAFILE_NEURONIO = data_file("capath", "4e1295a3.0")
CAFILE_CACERT = data_file("capath", "5ed36f99.0")
WRONG_CERT = data_file("wrongcert.pem")

CERTFILE_INFO = {
'issuer': ((('countryName', 'XY'),),
Expand Down Expand Up @@ -118,7 +117,7 @@ def data_file(*name):
NOKIACERT = data_file("nokia.pem")
NULLBYTECERT = data_file("nullbytecert.pem")

DHFILE = data_file("dh1024.pem")
DHFILE = data_file("ffdh3072.pem")
BYTES_DHFILE = os.fsencode(DHFILE)

# Not defined in all versions of OpenSSL
Expand Down Expand Up @@ -2825,8 +2824,8 @@ def test_wrong_cert_tls12(self):
connect to it with a wrong client certificate fails.
"""
client_context, server_context, hostname = testing_context()
# load client cert
client_context.load_cert_chain(WRONG_CERT)
# load client cert that is not signed by trusted CA
client_context.load_cert_chain(CERTFILE)
# require TLS client authentication
server_context.verify_mode = ssl.CERT_REQUIRED
# TLS 1.3 has different handshake
Expand Down Expand Up @@ -2858,7 +2857,8 @@ def test_wrong_cert_tls12(self):
@unittest.skipUnless(ssl.HAS_TLSv1_3, "Test needs TLS 1.3")
def test_wrong_cert_tls13(self):
client_context, server_context, hostname = testing_context()
client_context.load_cert_chain(WRONG_CERT)
# load client cert that is not signed by trusted CA
client_context.load_cert_chain(CERTFILE)
server_context.verify_mode = ssl.CERT_REQUIRED
server_context.minimum_version = ssl.TLSVersion.TLSv1_3
client_context.minimum_version = ssl.TLSVersion.TLSv1_3
Expand Down
32 changes: 0 additions & 32 deletions Lib/test/wrongcert.pem

This file was deleted.