Skip to content

Fixed SSL wrap_socket compatibility for Python 3.13#28

Open
Santosh-Baliarsingh wants to merge 1 commit into
BishopFox:masterfrom
Santosh-Baliarsingh:fix-ssl-wrap_socket
Open

Fixed SSL wrap_socket compatibility for Python 3.13#28
Santosh-Baliarsingh wants to merge 1 commit into
BishopFox:masterfrom
Santosh-Baliarsingh:fix-ssl-wrap_socket

Conversation

@Santosh-Baliarsingh
Copy link
Copy Markdown

Summary

Python 3.13 removed ssl.wrap_socket, causing AttributeError when running h2csmuggler.

Fix

Replaced:

retSock = ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_TLS)

with

context = ssl.SSLContext(ssl.PROTOCOL_TLS)
retSock = context.wrap_socket(sock, server_hostname=proxy_url.hostname)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant