Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Oct 4, 2023
1 parent c90654c commit 61c5528
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion kmip/services/kmip_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ def open(self):
six.reraise(*last_error)

def _create_socket(self, sock):
context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH, cafile=self.certfile)
context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=self.certfile)
context.check_hostname = False
self.socket = context.wrap_socket(
sock,
server_side=False,
Expand Down
2 changes: 1 addition & 1 deletion kmip/services/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def interrupt_handler(trigger, frame):
for cipher in auth_suite_ciphers:
self._logger.debug(cipher)

context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=self.config.settings.get('certificate_path'))
context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH, cafile=self.config.settings.get('certificate_path'))
self._socket = context.wrap_socket(self._socket,
server_side=True,
do_handshake_on_connect=False,
Expand Down

0 comments on commit 61c5528

Please sign in to comment.