Skip to content

Commit

Permalink
fixed issues with ssl connection
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Mar 22, 2023
1 parent c9591a2 commit 46d9de8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions irissqlcli/completion_refresher.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def _bg_refresh(self, sqlexecute, callbacks, completer_options):
username=e.username,
password=e.password,
embedded=e.embedded,
sslcontext=e.sslcontext,
**e.extra_params,
)

Expand Down
4 changes: 3 additions & 1 deletion irissqlcli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,9 @@ def cli(
)

if cert:
sslcontext = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH, cafile=cert)
sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
sslcontext.load_verify_locations(cert)
sslcontext.check_hostname = False
else:
sslcontext = None

Expand Down

0 comments on commit 46d9de8

Please sign in to comment.