Skip to content

Commit

Permalink
Add explicit hostname checking (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-at-redhat authored Sep 8, 2023
1 parent 3273e5a commit cb3c01b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion receptorctl/receptorctl/socket_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,11 @@ def connect(self):
context.load_cert_chain(
certfile=self._cert, keyfile=self._key
)
if self._insecureskipverify:
if not self._insecureskipverify:
context.check_hostname = True
else:
context.check_hostname = False

self._socket = context.wrap_socket(
self._socket, server_hostname=host
)
Expand Down

0 comments on commit cb3c01b

Please sign in to comment.