Skip to content

Commit

Permalink
Fix for cloud: auth key rename, and send SNI even when check_hostname…
Browse files Browse the repository at this point in the history
…=False
  • Loading branch information
fantix committed Feb 9, 2023
1 parent 14363fb commit 27e7a4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions edgedb/blocking_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,10 @@ async def connect_addr(self, addr, timeout):
raise TimeoutError

# Upgrade to TLS
if self._params.ssl_ctx.check_hostname:
server_hostname = addr[0]
else:
server_hostname = None
sock.settimeout(time_left)
try:
sock = self._params.ssl_ctx.wrap_socket(
sock, server_hostname=server_hostname
sock, server_hostname=addr[0]
)
except ssl.CertificateError as e:
raise con_utils.wrap_error(e) from e
Expand Down
2 changes: 1 addition & 1 deletion edgedb/protocol/protocol.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ cdef class SansIOProtocol:
'database': self.con_params.database,
}
if self.con_params.secret_key:
params['token'] = self.con_params.secret_key
params['secret_key'] = self.con_params.secret_key
handshake_buf.write_int16(len(params))
for k, v in params.items():
handshake_buf.write_len_prefixed_utf8(k)
Expand Down

0 comments on commit 27e7a4f

Please sign in to comment.