Commit 6d85718b authored by dieter's avatar dieter

fix tests checking for the wrong SSL context

parent b1cce673
......@@ -140,7 +140,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
cafile=None, capath=None,
):
factory.assert_called_with(
ssl.Purpose.CLIENT_AUTH, cafile=cafile, capath=capath)
ssl.Purpose.SERVER_AUTH, cafile=cafile, capath=capath)
context.load_cert_chain.assert_called_with(*cert)
self.assertEqual(context, factory.return_value)
self.assertEqual(context.verify_mode, verify_mode)
......@@ -362,7 +362,7 @@ def client_ssl(cafile=server_key,
client_key=client_key,
):
context = ssl.create_default_context(
ssl.Purpose.CLIENT_AUTH, cafile=server_cert)
ssl.Purpose.SERVER_AUTH, cafile=server_cert)
context.load_cert_chain(client_cert, client_key)
context.verify_mode = ssl.CERT_REQUIRED
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment