From 298be3b30a385af3c2506ba2737dbb530ac38e1d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 25 Jul 2024 14:05:10 -0400 Subject: [PATCH] Point to the C context object rather than python class The OpenSSL variant of Context is a python class, but it does have a C context in it. --- confluent_server/confluent/sockapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/sockapi.py b/confluent_server/confluent/sockapi.py index 8aca0058..86534767 100644 --- a/confluent_server/confluent/sockapi.py +++ b/confluent_server/confluent/sockapi.py @@ -431,7 +431,7 @@ def _tlsstartup(cnn): ctx.use_certificate_file('/etc/confluent/srvcert.pem') ctx.use_privatekey_file('/etc/confluent/privkey.pem') ctx.set_verify(libssln.VERIFY_PEER, lambda *args: True) - ssl_ctx = PySSLContext.from_address(id(ctx)).ctx + ssl_ctx = PySSLContext.from_address(id(ctx._context)).ctx libsslc.SSL_CTX_set_cert_verify_callback(ssl_ctx, verify_stub, 0) cnn = libssl.Connection(ctx, cnn) cnn.set_accept_state()