Skip to content

Commit

Permalink
Settings: Use system certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
VesnaT committed Jan 6, 2025
1 parent 00ffd42 commit 2d2861e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions orangecanvas/application/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ def __setupUi(self):
line_edit_https_proxy = QLineEdit()
self.bind(line_edit_https_proxy, "text", "network/https-proxy")
form.addRow("HTTPS proxy:", line_edit_https_proxy)
cb_use_certs = QCheckBox()
self.bind(cb_use_certs, "checked", "network/use-certs")
form.addRow("Use system certificates:", cb_use_certs)
tab.setLayout(form)

if self.__macUnified:
Expand Down
2 changes: 2 additions & 0 deletions orangecanvas/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ def init():
("network/http-proxy", str, '', 'HTTP proxy.'),

("network/https-proxy", str, '', 'HTTPS proxy.'),

("network/use-certs", bool, False, "Use system certificates."),
]


Expand Down
5 changes: 5 additions & 0 deletions orangecanvas/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,11 @@ def fix_set_proxy_env():
else:
os.environ.pop(env_scheme, "")

if settings.value("network/use-certs", False, bool):
import truststore

truststore.inject_into_ssl()


def fix_macos_nswindow_tabbing():
warnings.warn(
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"typing_extensions",
"packaging",
"numpy",
"truststore",
)


Expand Down

0 comments on commit 2d2861e

Please sign in to comment.