From 27e7a4facf2b1280d999a267e07f7d91af977beb Mon Sep 17 00:00:00 2001 From: Fantix King Date: Thu, 9 Feb 2023 15:18:41 -0500 Subject: [PATCH] Fix for cloud: auth key rename, and send SNI even when check_hostname=False --- edgedb/blocking_client.py | 6 +----- edgedb/protocol/protocol.pyx | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/edgedb/blocking_client.py b/edgedb/blocking_client.py index e293a534..e185b501 100644 --- a/edgedb/blocking_client.py +++ b/edgedb/blocking_client.py @@ -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 diff --git a/edgedb/protocol/protocol.pyx b/edgedb/protocol/protocol.pyx index a33f815d..b973b885 100644 --- a/edgedb/protocol/protocol.pyx +++ b/edgedb/protocol/protocol.pyx @@ -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)