Skip to content

Commit

Permalink
fix: Update SSL context configuration for TLS 1.2 protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
ctoth committed Jan 12, 2025
1 parent 31f6b02 commit 08d0e47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/remoteClient/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,12 +401,12 @@ def createOutboundSocket(
serverSock.settimeout(self.timeout)
serverSock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
serverSock.ioctl(socket.SIO_KEEPALIVE_VALS, (1, 60000, 2000))
ctx = ssl.SSLContext()
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
if insecure:
ctx.verify_mode = ssl.CERT_NONE
ctx.check_hostname = not insecure
ctx.load_default_certs()
ctx.minimum_version = ssl.PROTOCOL_TLSv1_2

if insecure:
log.warn("Skipping certificate verification for %s:%d", host, port)
serverSock = ctx.wrap_socket(sock=serverSock, server_hostname=host)
Expand Down

0 comments on commit 08d0e47

Please sign in to comment.