Skip to content

Commit

Permalink
Add back patch for TLSv1.3 pure PSK
Browse files Browse the repository at this point in the history
  • Loading branch information
WillChilds-Klein committed Dec 28, 2024
1 parent 8953646 commit 62922de
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/ci/integration/python_patch/main/aws-lc-cpython.patch
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ index 0e50d09..f4b7b3c 100644
def test_dh_params(self):
# Check we can get a connection with ephemeral Diffie-Hellman
client_context, server_context, hostname = testing_context()
@@ -4443,14 +4445,14 @@ def server_callback(identity):
self.assertEqual(identity, client_identity)
return psk

- client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
+ client_context, server_context, _ = testing_context()
+
client_context.check_hostname = False
client_context.verify_mode = ssl.CERT_NONE
client_context.minimum_version = ssl.TLSVersion.TLSv1_3
client_context.set_ciphers('PSK')
client_context.set_psk_client_callback(client_callback)

- server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
server_context.minimum_version = ssl.TLSVersion.TLSv1_3
server_context.set_ciphers('PSK')
server_context.set_psk_server_callback(server_callback, identity_hint)
diff --git a/Modules/Setup b/Modules/Setup
index cd1cf24..53bcc4c 100644
--- a/Modules/Setup
Expand Down

0 comments on commit 62922de

Please sign in to comment.