Skip to content

Commit

Permalink
Correct wrap_socket call for Python 3.12
Browse files Browse the repository at this point in the history
Signed-off-by: Aarni Koskela <[email protected]>
  • Loading branch information
akx committed Dec 21, 2023
1 parent d89f66e commit 8a8d4d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/paho_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def create_server_socket_ssl(*args, **kwargs):

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
ssock = ssl.wrap_socket(
context = ssl.SSLContext(ssl_version)
ssock = context.wrap_socket(
sock, ca_certs="../ssl/all-ca.crt",
keyfile="../ssl/server.key", certfile="../ssl/server.crt",
server_side=True, ssl_version=ssl_version, **kwargs)
Expand Down

0 comments on commit 8a8d4d9

Please sign in to comment.