Skip to content

Commit

Permalink
Fixing Dataserver token handling
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbosch committed May 10, 2024
1 parent 417f2bf commit 547f98d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kuksa-client/kuksa_client/cli_backend/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,13 @@ async def connect(self, _=None):
subprotocols = ["VISSv2"]
if not self.insecure:
context = ssl.create_default_context()
context.load_cert_chain(
certfile=self.certificate, keyfile=self.keyfile)
if self.certificate is not None and \
self.keyfile is not None:
logger.debug("Credentials used for mutual authentication; "
"Client certificate file = %s, Client key file = %s",
self.certificate, self.keyfile)
context.load_cert_chain(
certfile=self.certificate, keyfile=self.keyfile)
context.load_verify_locations(cafile=self.cacertificate)
# We want host name to match
# For example certificates we use subjectAltName to make it match for Server, localahost and 127.0.0.1
Expand Down

0 comments on commit 547f98d

Please sign in to comment.