Skip to content

Commit a7be4cc

Browse files
committed
Some cleanup
Signed-off-by: Levko Kravets <[email protected]>
1 parent 646cb1d commit a7be4cc

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/databricks/sql/auth/thrift_http_client.py

+4-11
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ def __init__(
2626
uri_or_host,
2727
port=None,
2828
path=None,
29-
cafile=None,
30-
cert_file=None,
31-
key_file=None,
3229
ssl_options: SSLOptions = None,
3330
max_connections: int = 1,
3431
retry_policy: Union[DatabricksRetryPolicy, int] = 0,
@@ -51,14 +48,10 @@ def __init__(
5148
self.scheme = parsed.scheme
5249
assert self.scheme in ("http", "https")
5350
if self.scheme == "https":
54-
self.certfile = cert_file
55-
self.keyfile = key_file
56-
# TODO: Seems this context is never used anywhere - need to double-check
57-
self.context = (
58-
ssl.create_default_context(cafile=cafile)
59-
if (cafile and not ssl_options)
60-
else ssl_options.create_ssl_context()
61-
)
51+
# TODO: Not sure if those options are used anywhere - need to double-check
52+
self.certfile = self._ssl_options.tls_client_cert_file
53+
self.keyfile = self._ssl_options.tls_client_cert_key_file
54+
self.context = self._ssl_options.create_ssl_context()
6255
self.port = parsed.port
6356
self.host = parsed.hostname
6457
self.path = parsed.path

0 commit comments

Comments
 (0)